Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a combo chart showing all quarters in the x axis. I want this to be fixed and showing the last 8 quarters whatever period I select.
How i can do that ?
Thanks,
dani
Hi Dani,
You can use this command in your expression:
Sum( {< Quarter= {"<= $(=Max(Quarter))"} >} Sales)
And you add a limit to the dimension quarter.
Paul
Hi
use this one
sum({1}Amount)
in expression
Assume that your date field name is "Period".
Then you can use a script to create a QuarterNum field in the data load script.
It is always useful to create the numeric format of the time periods.
Ceil(month(Period)/3) + if(year(Period)=Year(Today()),4,0) as QuarterNum,
Suppose you Quarter field is like : QtrYear (in format like Q2-2012, Q1-2013,Q2-2013 etc)
You can use that field as dimension and now in your chart expression you can use like below.
sum({<QuarterNum={">=$(=max(QuarterNum)-1)<=$(=max(QuarterNum))"} >} Amount) which will result in showing the last two quarters.
But I think what you are looking for is not completely here. The above solution will show data based on the Quarter selected. Because I think when we use functions like max or min they are relative to the current selection. So the quarter you selected becomes the max quarter unless you keep a separate variable at load script level to store the max value of the Quarter in your data. Then that variable can be used.
HI Dani,
1st of all derive Quarter from Date field. Then add calculated Dimension in your chart,
=if(ceil(Month(Today())/3)<='8',YourQuarterField)
and Bypassall Selections in expression with help of Set analysis
Regards
Kiran Rode
+91 897 6977 897