Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
Say I have sum(Sales)
I want it as a cumulative sum over a time period, to start with Date
So say sum sales for 20191001 is 200, for 20191002 is 300, then it should show 200+300 as the value on 20191002 etc...
Then you can for example use the new for QV12 sortable AGGR function
Aggr(RangeSum(Above(sum(Sales), 0, RowNo())), YearMonth, (Date, (NUMERIC)))
This works for me.
HOWEVER
My time period is really not only Date, but it's a cyclic group with Date, YearWeek, YearMonth and Year
The above expression only works for Date, but not for the others
How do I make an expression with cumulative sum that works for this cyclic time group?
Yes, some sort of if statement would be needed to get this to work.
Sunny,
I tried expression: =Avg(F3)& Count(GetCurrentField([Group]))
and it works, I guess it's about scope where/when you are using this. Today I have to log off early, but definitely will come back and do some more testing..
I don't think that this is working as you might be expecting. =Avg(F3)& Count(GetCurrentField([Group])). All it is doing is to Counting the text... not the field itself.... Try this =Avg(F3)& Concat(DISTINCT GetCurrentField([Group])) and you will see F2 instead of AA and BB when you are on F2 within your group.
I think so, exact expression will have to tested out but you can have an overarching if statement or you can have an if statement just for your dimensions part.... but your idea is right
Spot on Sunny. Thanks.