Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i need a chart like attached dashboard that show cumulative sum
in dimension i have date group and in expression i have sum(transaction)
i need that when user drill to 2013 year he see 200 on chart it means that i need sum last year value andcurrent value
hat should i use in expression
Try this
=If(GetCurrentField([G1]) = 'Dyear',
RangeSum(Above(TOTAL Sum(Transaction), 0, RowNo(TOTAL))),
Aggr(RangeSum(Above(TOTAL Sum({<Dyear>}Transaction), 0, RowNo(TOTAL))), MonthYear))
Where MonthYear is created in Script like this
LOAD *,
Date(MonthStart(Date#(Ddate, 'YYYYMMDD')), 'MMMYYYY') as MonthYear;
LOAD * INLINE [
Ddate, Transaction, Dyear, Dmonth
20121101, 100, 2012, 11
20121202, 200, 2012, 12
20130101, -100, 2013, 01
20130201, 1000, 2013, 02
];
Try this
=If(GetCurrentField([G1]) = 'Dyear',
RangeSum(Above(TOTAL Sum(Transaction), 0, RowNo(TOTAL))),
Aggr(RangeSum(Above(TOTAL Sum({<Dyear>}Transaction), 0, RowNo(TOTAL))), MonthYear))
Where MonthYear is created in Script like this
LOAD *,
Date(MonthStart(Date#(Ddate, 'YYYYMMDD')), 'MMMYYYY') as MonthYear;
LOAD * INLINE [
Ddate, Transaction, Dyear, Dmonth
20121101, 100, 2012, 11
20121202, 200, 2012, 12
20130101, -100, 2013, 01
20130201, 1000, 2013, 02
];
thank you Sunny Talwar