Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
we have created a straight table with one dimension called month and 8 expressions.
requirement was to display only one month in the table.
so we selected Max Number (1-100) to 1 in the presentation tab. by default it displays only Jan when no selection is made on month. when clicked on different months it changes accordingly.
but the user wants to see the previous month values by default.. which should be December when i see in January.
so i tried modifying the dimension with the help of calculated dimension. its not giving expected results when no selection is made on month.
below is the calculated dimension.
=if(GetSelectedCount(Month)=0,Month(AddMonths(MonthStart(Today()),-1))),Month)
please help. any suggestions appreciated.
Thanks
Jyothi
I don't think you want a calculated dimension here - instead try using set analysis on your expression(s), like:
=if(GetSelectedCount(Month)=0, Sum({<Month={"$(=Month(AddMonths(MonthStart(Today()),-1)))"}>}Value), Sum(Value))
I've attached your example here.
Aaron
Could you post some sample?
That expression seems to work for me fine, the only difference I can see is you have an extra bracket after the Today()), -1))) statement - there should only be two brackets needed at the end, not 3.
If that's just a typo, maybe worth posting an example!
Hi Aaron.. sorry that was a typo.. i Have attached a sample.. please check..
I don't think you want a calculated dimension here - instead try using set analysis on your expression(s), like:
=if(GetSelectedCount(Month)=0, Sum({<Month={"$(=Month(AddMonths(MonthStart(Today()),-1)))"}>}Value), Sum(Value))
I've attached your example here.
Aaron
Thanks Aaron.. Issue resolved