Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am attaching files
if yu see the qvw file I am calculating YTD in script for month wise.that is working fine. but if I take age as dimension it is not working
its showing wrong values.
any ideas
thanks in advance
Create YTD Flag like this
Data:
LOAD *,
YearToDate(Period1,0,4)*-1 as Flag
FROM table;
Now use expression like below
=sum({<Flag={1}>} Value)
will it work if I select a month
Supppose if I select July 2017 it shud show value summing up from April 2017 to July 2017
Yes. It will work
Data:
LOAD *,
monthname(Period1) as MonthYear,
YearToDate(Period1,0,4)*-1 as Flag
FROM table;
But why you want Apr 17 to Jul 17 when jul 17 is selected, it should ideally display only Jul 17 no?
yes if I select july 17 it shud sum up value from apr 17 to till date and show
You can exclude the selection of your other periods for YTD,
Data:
LOAD *,
monthname(Period1) as MonthYear,
YearToDate(Period1,0,4)*-1 as Flag
FROM table;
expression
Sum({<Flag={1},MonthYear>}Leavers)
this is not working
See this post
Calculating rolling n-period totals, averages or other aggregations