Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
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.
Please see the sample qvf attached.
Any suggestions are welcome.
Thanks,
Abhishek.
Hi Guys,
So found a temp solution:
What we need is a calculated dimension. So we need to find a way to rank Qtrs. in decreasing order and then use a calculated dimension for x axis.
=if(Rank<= $(vQuarters), Qtrs).
Here, the rank variable ranks the latest qtr as 1. For example, if 2021 Q4 is the latest qtr, its rank is 1, 2021 Q3's ranks is 2 and so on.
Though, I feel this is a workaround. Any better suggestions are welcome.
Thanks,
Abhishek.
Hi Guys,
So found a temp solution:
What we need is a calculated dimension. So we need to find a way to rank Qtrs. in decreasing order and then use a calculated dimension for x axis.
=if(Rank<= $(vQuarters), Qtrs).
Here, the rank variable ranks the latest qtr as 1. For example, if 2021 Q4 is the latest qtr, its rank is 1, 2021 Q3's ranks is 2 and so on.
Though, I feel this is a workaround. Any better suggestions are welcome.
Thanks,
Abhishek.