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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
mcornfield
Helper III
Helper III

Cumulative (Running) Totals in DAX

 

Looking to build a Measure that shows the Cumulative % Measure In order by DSC RevNet. I tried multiple Formulas i found but non seem to work.

 

mcornfield_0-1632864842257.png

 

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Try these measures

Rank = if([RevNet]=BLANK(),BLANK(),RANKX(ALL('Data'[Name]),[RevNet],,0,SKIP))
Cumulative RevNet = SUMX(TOPN([Rank],CALCULATETABLE(VALUES('Data'[Name]),ALL('Data'[Name])),[RevNet]),[RevNet])
% Measure = divide([Cumulative RevNet],CALCULATE([RevNet],all('Data'[Name])))

Hope this helps.

 


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

Still getting this error. 

 

 

mcornfield_0-1632872087559.png

 

themistoklis
Community Champion
Community Champion

@mcornfield 

 

You can try the following formula:

Cumulative_% = 
VAR _cumul_actual =
    CALCULATE (
        SUM ( 'Table'[RevNet] ),
        FILTER ( ALL ( 'Table' ), 'Table'[RevNet]>= MIN ( 'Table'[RevNet] ) )
    )
VAR _Total =
    CALCULATE ( SUM ( 'Table'[RevNet] ), ALL ( 'Table' ) )
RETURN
    _cumul_actual / _Total

 

Workspace attached on this message:

 

I tried this but it didnt work. I have a live connection to a tabular model so the Sum() Doesnt work i have to use everything as a measure.

 

%%Cumulative_% =
VAR _cumul_actual =
CALCULATE (
[Revenue Net Rolling 12],
FILTER ( ALL ( Products ), [Revenue Net Rolling 12]>= MIN ( [Revenue Net Rolling 12] ) )
)
VAR _Total =
CALCULATE ( [Revenue Net Rolling 12] , ALL ( Products ) )
RETURN
_cumul_actual / _Total

@mcornfield 

You need to make one correction:

FILTER ( ALL ( Products ), [Revenue Net Rolling 12]>= MIN ( [Revenue Net Rolling 12] ) )

 

In this filter you should use the field and not the measure (bold statements)

 

Change to:

FILTER ( ALL ( Products ), 'Products'.Revnet >= MIN ( 'Products'.Revnet ) )

its only a measure available. No Fields. Its a live connection to tabular model so i cant do much

mcornfield_0-1632938423858.png

 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors