Forum Discussion

anabianco09's avatar
anabianco09
Helper II
3 years ago
Solved

Cumulative Values taking two parameters into consideration

Hi all, I am trying to plot a cumulative value for sales over the year (by months here) (

Cumulative Revenue = CALCULATE(SUM('AOP 2023 - Program'[Expected Revenue (converted).amount]), FILTER(ALLSELECTED('AOP 2023 - Program'), 'AOP 2023 - Program'[Estimated Ship Date] <= MAX('AOP 2023 - Program'[Estimated Ship Date])))) 

, and I am using the stacked column chart. When I don't stack the columns, the values cumulate as it should do:

However, when I use the legend option for that, it messes up the visual:

Is there a way for me to add the parameter of the legend as a cumulative parameter together with the date?

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi anabianco09 

    You can try the following measure

    Cumulative Revenue = CALCULATE(SUM('AOP 2023 - Program'[Expected Revenue (converted).amount]), FILTER(ALL('AOP 2023 - Program'), 'AOP 2023 - Program'[Estimated Ship Date] <= MAX('AOP 2023 - Program'[Estimated Ship Date])))

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • It is clear to see that the legend (job stage) breaks it: 

    but even so, I wanted to have them cumulated ....

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi anabianco09 

    You can try the following measure

    Cumulative Revenue = CALCULATE(SUM('AOP 2023 - Program'[Expected Revenue (converted).amount]), FILTER(ALL('AOP 2023 - Program'), 'AOP 2023 - Program'[Estimated Ship Date] <= MAX('AOP 2023 - Program'[Estimated Ship Date])))

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.