Controlling Time Periods shown using a variable in line chart
I am trying to create a line chart showing revenue by qtr.. I want to control the quarters shown using a variable.
For example, if I select 4, the line chart should limit to the latest four quarters, if 8 then latest 8 quarters and so on.
I used limiting dimension using fixed number using the variable I created. But, it calculates using the measure I am using (revenue). This is not the result I want. The variable should only affect the x axis dimension - qtr. in my case.