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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors