Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
sofias
Frequent Visitor

Cummulative Sum on columns not working , needs to change according to filters applied

Hello everyone,

I would appreciate your help on the following: 

Capture.JPG

1) RUNNING_NMV_FINAL  = MEASURE = 

IF(AND(ISFILTERED('dim pm'[payment]),ISFILTERED('DIM TIER'[TIER])),
CALCULATE (
SUM (Table2[NMV]),
FILTER(ALLEXCEPT(Table2,Table2[PM],Table2[TIER]),Table2[Index] <= MAX ( Table2[Index])
)
),
calculate(sum(Table2[NMV]),filter(all(Table2),Table2[Index] <= max(Table2[Index])))
)
If you notice, I have filters selected. And this measure only works when I have, either, one selection per filter or when no selection is done in ANY filter. 
 
2) Running nmv COLUMN  = column
CALCULATE (
SUM (Table2[NMV]),
ALL (Table2),
Table2[Index] <= EARLIER (Table2[Index])
) --> followed your logic
 
Although it is displaying the running total with no slicers selected, when I start to filter, it will not change dynamically as I need. 
 
In the end of this, what I would need to do is to divide each row of this cummulative_sales by the TOTAL_SALES_AMOUNT, which will be a %. Then I will do the same for the Losses (all the process before mentioned).
 
I need this because I want to create a line chart with 2 measures (cummulative sales for X axis and cummulative losses for Y axis) and on the legends I would put the country (so, 1  line per country). But the line chart does not allow me to put measures on the X axis, hence my need of using columns.
 
Can anyone help me please? I am starting to give up on this.
 
Thank you!!!
1 REPLY 1
vanessafvg
Super User
Super User

@sofias  is possible to share some data?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.