I'm currently trying to show dynamic charts on dashboards -> for example whenever I select a month - Jan it should show the last 3 months data i.e only Nov, Dec, Jan data, if I select Mar then it shows Jan, Feb, March data on the dashboard.
I'm able to get this filter on Module but on the charts, I'm not able to get it properly.
Filter logic used:-
Dashboard i got once i published the chart:-
Dashboard i got once i changed the month from Jan to Dec
Ideally, the 2nd dashboard should have Oct, Nov, Dec data. When i changed the month to Nov it's showing only Nov data
Hi @Akhtar.shahbaz , it worked but what i didn't understand was how having a filter true, publishing chart, changing the filter to the formula of the last 3 months worked while my source module i have taken the formula to last 3 months & published dashboard didn't worked? Any idea?
Start by creating a system module that has the month selector.
Next create another system module that only uses time as a dimension. In our case month.
Create two line items, a Boolean, one for months only and set to "TRUE"
Create a second line item for the last 3 months and lookup the current period from the other system module.
The advantage of doing it this way is that you only calculate the filter once and then reuse it in your chart module which you will see in a bit.
Our chart module only contains one line item, the value you want to chart. No filters, lookups, or periods are needed here because we don't want to keep recalculating them for ever month (or product and location if you have those dimensions too).
Apply a filter to your chart module from the two line items you created in your system module.
Save the view and use this for your chart.
When you add the month selector to your dashboard and change it your graph will dynamically change to reflect the last three months.