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
Samarth-Borade
Frequent Visitor

Revverse cumulative error

RevCum_Revenue123 = VAR RunningTotal= CALCULATE([sss], FILTER(ALL(grp[Rev]),grp[Rev]>=MIN(grp[Rev])))
RETURN IF(ISBLANK([sss]),BLANK(),RunningTotal)
 
here [sss] = SUM(grp[Rev])
 
SamarthBorade_0-1675330670841.png
when i remove customer code, it will only show the entire sum.I want to show the reverse cumulative ,
i.e in descending  order: 9031 then 9031+8984 then 9031+8984+4792.
1 ACCEPTED SOLUTION

@Samarth-Borade 
Please refer to attached sample file with the proposed solution

1.png

RevCum_Revenue = 
VAR CurrentRevenue = 
    SUM ( 'Table'[Revenu] )
VAR T1 = 
    SELECTCOLUMNS ( 
        ALLSELECTED ( 'Table'[Customer Cod] ),
        "@Revenue", CALCULATE ( SUM ( 'Table'[Revenu] ) )
    )
VAR T2 = 
    FILTER ( T1, [@Revenue] >= CurrentRevenue )
RETURN
    SUMX ( T2, [@Revenue] )

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @Samarth-Borade 
What is the result that you're looking for?

Any leads?

 

SamarthBorade_0-1675335927635.png

 

@Samarth-Borade 
Please refer to attached sample file with the proposed solution

1.png

RevCum_Revenue = 
VAR CurrentRevenue = 
    SUM ( 'Table'[Revenu] )
VAR T1 = 
    SELECTCOLUMNS ( 
        ALLSELECTED ( 'Table'[Customer Cod] ),
        "@Revenue", CALCULATE ( SUM ( 'Table'[Revenu] ) )
    )
VAR T2 = 
    FILTER ( T1, [@Revenue] >= CurrentRevenue )
RETURN
    SUMX ( T2, [@Revenue] )

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors