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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Lsuhajda
New Member

Running total based on ranking

Hi all,

 

I am new to DAX and I am working with a sample Contoso Database available from the link below:

 

https://github.com/sql-bi/Contoso-Data-
Generator/releases/download/v1.0.0/Contoso.100K.bak.

 

I am trying to create  a DAX expression that performs a cumualtive total of Quantity on Customer Full Name.

Customer data is from Data Customer table and Quantity is coming from Data Order Rows.  These tables are joined by 

Data Customer (Customer Key) - Data Orders (Customer Key) - Data Order Rows (Order Key)

 

Lsuhajda_0-1681799515235.png

 

 

My Expresisons is from the Running total is:

 

RT= VAR IND=[RANKING]

RETURN

CALCULATE (SUM

sum('Data OrderRows'[QUANTITY]),
FILTER(
    ALL('Data Customer'[FULL NAME]),
    IND>RANKX(ALL('Data Customer'[FULL NAME]),'Data Customer'[RANKING])))

 

- [Customer] - Full Name is in Data Customer table and derived as :

Full Name = CONCATENATE('Data Customer'[GivenName],'Data Customer'[Surname])
-[Ranking] -  (ALL('Data Customer'[Full Name]),[measure],,desc)
 -[Measure] - SUM('Data OrderRows'[Quantity])
 
I have a table where i show Full Name ,ranking and Measure order Descending based on Ranking. The new Column I try to add is th cumulative total of the Measure. Using the above Expression for RT does not give an error but the table goes blank.
 
Please let me know if you have any ideas or need more info,context
 
Thanks
0 REPLIES 0

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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