Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
prod | date | gg | Cumulative sum for product |
A | 12/01/20 | 10 | 10 |
A | 15/02/20 | 20 | 30 |
B | 18/01/20 | 5 | 5 |
C | 1/01/20 | 5 | 5 |
C | 3/03/20 | 12 | 17 |
How can i obtain the cumulative sum for each product like the column ?
thanks
Hi @c_pannese,
You have to do it in the back-end.
Create a new field with using this formula:
If(prod = Previous(prod), (gg + Previous(gg)), gg) as CumulativeSum
*don't forget to put order by clause in where condition (Order By date, prod)
attached link for the similar issue: Similar Post
Let me know if works.
Regards,
AK
I can't because gg is a measure. In the script i don' t have this field,it is a variabile value.