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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors