Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
i got a situation, where my data do look like:
Month, Sales
1, 5
2, 3
3, 2
on the base of field: Sales i created the cumulative values by using of this expression:
RangeSum(Above(Sum(Sales),0, RowNO())) and my data do look like:
Month, CumulValue
1, 5
2, 8
3, 10
when i am building the bar-diagramm with Month as Dimension and CumulValue as Expression and if i select the month 3 so i see only the Value: 2, my expected value is: if i select only one or last dimension like: Month = 3, i want see only the cumul value = 10.
Does anybody have any idea how to resolve this issue (by using of set expression)?
Thanks a lot
Beck
Perhaps this?
if(Year=previous(Year), rangesum(Value, peek(CumulativeSales)),Value) as CumulativeSales
Hi
The values will not change if u use it in the backend but if u use it in front end the values depend on previous value so the value will get changed and retains its old value.
Try using this expression in the backend
RangeSum(peek(CumulaiveSales) , Sales) as CumulaiveSales
Hope this helps
Thanks
Hi Kashyap,
thanks a lot for your responce, i will implement it and will let you know, if i get a success
Hi Kashyap,
your expression does work well, i want ask you, can i use your expression:
RangeSum(peek(CumulaiveSales) , Sales) as CumulaiveSales
to show the cumulative Value for each Year, i show you an example:
Year, Month, Value
2019 1 5
2019 2 2
2019 3 3
2020 5 10
2020 6 2
2020 7 5
my expected output is:
Year, Month, Value KumulValue
2019 1 5 5
2019 2 2 7
2019 3 3 10
2020 5 10 10
2020 6 2 12
2020 7 5 17
and if i select the year = 2020 i want to see only the cumulative value for month and year of 2020
Do you any idea how to resolve this issue?
Thanks a lot
Perhaps this?
if(Year=previous(Year), rangesum(Value, peek(CumulativeSales)),Value) as CumulativeSales
Anil_Babu
thanks a lot for your time and help