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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

DAX formula cumulative running total

Hi,

 

I'm trying to create a new column with the cumulative running total on the Count Case ID. I tried already a lot of things but always with incorrect results. 

BertBaeckelmans_0-1605090010220.png

 

Can anyone help me with this?

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

I actually just solved the problem and found where I made the mistake (table was not ranked or sorted. I created a new table with all Variant IDs and counted all Case IDs which follows a certain Variant. Next I created a RANKX to rank the table based on the count. Then I could easily create a quick measure with the running total. 

Thanks for your quick response!

Cheers

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , CountCaseID is column you can have a new column

sumx(filter(Table,[VariantID] =earlier([VariantID])),[CountCaseID])

 

if it is measure you can have only measure

sumx(filter(allselected(Table),[VariantID] =max([VariantID])),[CountCaseID])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
AlB
Community Champion
Community Champion

Hi@Anonymous

I'm assuming what you show are the columns of your table placed in a visual (not aggregated) If so, you can create a calculated column in your table:

New column =
CALCULATE (
    SUM ( Table1[CountCaseID] ),
    ALL ( Table1 ),
    Table1[VariantID] <= EARLIER ( Table1[VariantID] )
)

Otherwise, you'll have to detail what it is you are showing (how the second column is built) and show a sample of the relevant tables in your model to get an accurate answer.

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Anonymous
Not applicable

Hi,

 

I actually just solved the problem and found where I made the mistake (table was not ranked or sorted. I created a new table with all Variant IDs and counted all Case IDs which follows a certain Variant. Next I created a RANKX to rank the table based on the count. Then I could easily create a quick measure with the running total. 

Thanks for your quick response!

Cheers

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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