Lets say user selected for the Sales for the date range from 1/1/2016 to 2/15/2016, Bar chart will show bar for that Range. And I need to show 1 more bar for the same date range but for last year, i.e., 1/1/2015 to 2/15/2015.
This is going to be a bit tricky, and there are several possible ways to set it up.
For me, the best way is to simply set up two connections. One pulls the 2016 data. The second pulls the 2015 data. They are triggered by the date picker control. They are built basically the same, except that the condition on the second query subtracts a year from the input values before filtering. These two connections write to cells that are adjacent to each other. Then you simply make each year’s data a separate series in the chart.
Another solution is to bring all your data in one fetch. You then set up the cells that feed the chart with formulas that call the relevant data from the data pool. The formulas would check the input date values, and would call the relevant values based on the x-axis (e.g., by month, by day). This takes quite a bit of tinkering to set up properly, and slows down the dashboard performance a bit. But it does reduce the number of data refreshes, if that is a concern.