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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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