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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Create a Running Total

I'm having trouble creating a running total.  An example of my data looks like the attached.

 

 

 Data.jpg

 

I'm wanting to take the counts of the Label column and take a running total of those counts to create a table like this.

 

LabelClaim_TypeCountRunning Total
Need Completed Reimbursement Request FormManual66
Statement/EOB RequiredOnline410
Service after end of Coverage PeriodOnline212
Balance ForwardOnline113
OtherOnline114
Payment/Proof of OrthodontiaOnline115
EOB RequiredManual116
Letter of Medical NecessityOnline117
No ReceiptOnline118
Credit Card ReceiptsOnline119
Estimated Statement/EOBManual1

20

1 ACCEPTED SOLUTION

@AnonymousI hope this will do it. Please check and let us know.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

7 REPLIES 7
v-yuta-msft
Community Support
Community Support

Hi ebrazis,

 

You should duplicate your original table then remove duplicate rows in the new table. Then create calculate column with DAX formula:

Count = CALCULATE(MAX(Table1[Count]))
Rank = RANKX(ALL('Table1 (2)'), 'Table1 (2)'[Count], , ASC, Dense)

Then you can create a running total calculate column like this:

Running Total = CALCULATE(SUMX('Table1 (2)', 'Table1 (2)'[Count]), FILTER('Table1 (2)', 'Table1 (2)'[Rank] >= EARLIER('Table1 (2)'[Rank])))

捕获.PNG 

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Hi Jimmy (@v-yuta-msft) - This solution almost got me what I trying to do.  The only thing that needs to be corrected is the Running Total is showing as 20 for all of those with a value of 1 when it should be showing at 13, 14, 15, 16, 17, 18, 19, 20 as it makes its way through each Label with a count of 1.  Is there a way to modify this in the current Running Total formula to do this?  Also, is there a way to modify the Rank so that the highest count shows as 1 and increases as the count decreases?  I played around with these a little bit and couldn't figure out either.

@AnonymousI hope this will do it. Please check and let us know.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Greg_Deckler
Community Champion
Community Champion

For running totals to work you generally need some kind of numeric value or date that you can compare. I would suggest another table that assigns a number to each of your categories that could serve this purpose.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Unfortunately we don't have any dates within the data.  I added a colimn which assigns a 1 for each line item, will this do the job?  If it does, how do I go about creating the appropriate measure?

 

Data 2.jpg

As Greg suggest, add another table for unique categories with a number assigned to each category, which you can add index column using edit query and that will get this going. If you share the data in excel sheet, will get you the solution.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi @parry2k - Here is a sample of the data you requested I send.  Sorry, I had trouble uploading the excel file.

 

Label

Claim_Type
Need Completed Reimbursement Request FormManual
Need Completed Reimbursement Request FormManual
Need Completed Reimbursement Request FormManual
Need Completed Reimbursement Request FormManual
Need Completed Reimbursement Request FormManual
Need Completed Reimbursement Request FormManual
Statement/EOB RequiredOnline
Statement/EOB RequiredOnline
Statement/EOB RequiredOnline
Statement/EOB RequiredOnline
Service after end of Coverage PeriodOnline
Service after end of Coverage PeriodOnline
Balance ForwardOnline
OtherOnline
Payment/Proof of OrthodontiaOnline
EOB RequiredManual
Letter of Medical NecessityOnline
No ReceiptOnline
Credit Card ReceiptsOnline
Estimated Statement/EOBManual

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors