Forum Discussion
Cumulative line (Whale Curve)
Hi,
I'm trying to make a cumulative line based on sales to each customer.
Currently I have sales and customers in a graph but the amount does not add up (blue line). How to make it like shown(in red) in the picture?
Thanks in advance
- Anonymous6 years ago
Ended up using:
https://www.youtube.com/watch?v=rlUBO5qoKow
And got it working
14 Replies
- AnonymousNot applicable
Try this
Var _date = max(date column)
Measure=
calculate(sum(sales),keepfilters( All(date column) <= _date) )
replace your date column
- AnonymousNot applicable
Hi Baskar,
Doesn't seem to work:
1. OmzWhale = VAR var_Date = max(Dates[Date]) Measure = CALCULATE(SUM(TB[Amount]),KEEPFILTERS(ALL(Dates[Date]) <= var_Date))This gives error: The syntax for Measure is incorrect.
1. OmzWhale = VAR var_Date = max(Dates[Date]) Return CALCULATE(SUM(TB[Amount]),KEEPFILTERS(ALL(Dates[Date]) <= var_Date))This gives "The true/false expression does not specify a column."
- richbenmintz
Resident Rockstar
Hi Anonymous,
please try
OmzWhale = VAR var_Date = max(Dates[Date]) Measure = CALCULATE(SUM(TB[Amount]),FILTER(ALL('Dates'),Dates[Date]) <= var_Date))Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!