Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)

How can I set cumulative sum for the following dataset

enter image description here

1 Answer

0 votes
by (22.5k points)
edited by

Go to measure New measure<- Total <- Running Total and create:

sales running total in part = 
CALCULATE(
    SUM('Query1'[sales]);
    FILTER(
        ALLSELECTED('Query1'[part]);
        ISONORAFTER('Query1'[part]; MAX('Query1'[part]); DESC)
    )
)

which gives us

enter image description here 

Check out the Power BI tutorial for more reference

Get an introduction to Power Bi from the below video: 

Looking for a comprehensive Power BI course? Enroll now!

Related questions

0 votes
1 answer
asked Jan 4, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
asked Dec 15, 2020 in BI by Chris (11.1k points)
0 votes
1 answer
asked Nov 26, 2020 in BI by Chris (11.1k points)

Browse Categories

...