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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
SYKim
New Member

Cumulative total by ranking with measure column

Hello all,

here I want to have cumulative total by ranking order (not date) but all the column is measure column.

 

My current formula and figure is as below.

Cumulative = SUMX(FILTER(ALLSELECTED(BOM),[Ranking]<=Maxx(BOM,[Ranking])),[Year 1])
 
All columns for 'Year1' and 'Ranking' is measure column.
SYKim_0-1699577295978.png

 

But I want above be like below.

 

SYKim_2-1699577452339.png

Could you please help to correct my formula?

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @SYKim ,

Please try this measure:

Cumulative = 
VAR CurrentRank = [Ranking]
RETURN
    IF (
        HASONEVALUE ( 'BOM'[CAT] ),
        SUMX (
            FILTER (
                ALLSELECTED ( 'BOM'[PNO(merged)], 'BOM'[CAT] ),
                [Ranking] <= CurrentRank
            ),
            [Year 1]
        ),
        SUMX ( ALLSELECTED ( 'BOM'[PNO(merged)], 'BOM'[CAT] ), [Year 1] )
    )

vcgaomsft_0-1699846602999.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

6 REPLIES 6
v-cgao-msft
Community Support
Community Support

Hi @SYKim ,

Please try this measure:

Cumulative = 
VAR CurrentRank = [Ranking]
RETURN
    IF (
        HASONEVALUE ( 'BOM'[CAT] ),
        SUMX (
            FILTER (
                ALLSELECTED ( 'BOM'[PNO(merged)], 'BOM'[CAT] ),
                [Ranking] <= CurrentRank
            ),
            [Year 1]
        ),
        SUMX ( ALLSELECTED ( 'BOM'[PNO(merged)], 'BOM'[CAT] ), [Year 1] )
    )

vcgaomsft_0-1699846602999.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

hi, 
Similiar with that case. How to create a measure group based on cumulative percentages like the following example

thians_0-1706242849154.png

so I can display visuals like the following

thians_1-1706242961016.png

I tried using an if condition but it doesn't display the values ​​per group. Can you help to create a proper dax formula ?
thanks

OMG! it works. Thanks!

Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

=SUMX(TOP([Ranking],CALCULATETABLE(VALUES(BOM[PNO Merged]), ALL(BOM[PNO Merged])),[Year 1]),[Year 1])


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

no it does not work. I got below message.

SYKim_0-1699583183032.png

 

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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 MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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