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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Cumulative/Running Total for Pareto

I'm having trouble creating a cumulative/running total.  My DAX formula currently looks like this.

 

Cumulative Denials = CALCULATE([Total Denials], FILTER(ALLEXCEPT(Denials, Denials[LABEL]), [Count Denials] >= MAX(Denials[LABEL])))

 

No errors come up until I go to add the measure to the table visualization which then shows as follows.

 

2018-08-27_14-33-46.jpg

 

This is an example on my data set. Since there are no numbers within the data to sum I've created a measure to count the Label column.  I've been able to create a count, total sum of the label, and rank.  I'm stuck on creating the cumulative/running total as there are no dates in the data I'm wanting to create a Pareto chart for.  To throw a little wrinkle into the situation, any Label with an Acct Type of "HSA" will need to be excluded from the cumulative total.

 

Acct TypeLabel
HRANeed Completed Reinbursement Request Form
HSAAdvance Reimbursement
HSAHSA Manual Claim
DCRANeed Completed Reinbursement Request Form
HRAStatement/EOB Required
DCRABalance Forward
DCRAOther
HCRAOther
HCRAEOB Required
DCRANo Receipt
HRANeed Completed Reinbursement Request Form
HSAAdvance Reimbursement
DCRABalance Forward
DCRAOther
HCRAOther
HCRAEOB Required
DCRANo Receipt
HRANeed Completed Reinbursement Request Form
HSAAdvance Reimbursement
HSAHSA Manual Claim
DCRANeed Completed Reinbursement Request Form
HRAStatement/EOB Required
DCRABalance Forward
DCRA

Other

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

This error should be caused by the [Count Denials] >= MAX(Denials[LABEL]))), the Denials[LABEL] is the text type, you cannot use it like that.

 

You could have a good reference of this bolg Pareto Charting in PowerBI which contains a sample.

 

If you still need help, please feel free to ask.

 

Best regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

This error should be caused by the [Count Denials] >= MAX(Denials[LABEL]))), the Denials[LABEL] is the text type, you cannot use it like that.

 

You could have a good reference of this bolg Pareto Charting in PowerBI which contains a sample.

 

If you still need help, please feel free to ask.

 

Best regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Cherry (@v-piga-msft) - I ended up modifying my data and was able to accomplish what I needed with the article you provided.  Thanks for the help!

 

 

Regards,

Eric

Anonymous
Not applicable

Hi Cherry (@v-piga-msft),

 

Thanks for the article it was extremely helpful; howver, I'm still running into a problem that I can't figure out.  Since my data doesn't have numbers to calculate off of, I need to create a count of the Label column instead of a sum which I was able to do without issue.  Here is an example of what my data looks like after creating my new table from the original table with the rank included.

 

BlendClientAcct TypeLabelCountRank
123-DCRA-A123DCRAA115
123-HCRA-A123HCRAA69
123-HRA-A123HRAA126
123-HSA-A123HSAA314
123-HCRA-B123HCRAB145
456-HRA-B456HRAB512
456-HSA-B456HSAB69
456-HRA-C456HRAC481
456-HSA-C456HSAC154
456-HSA-D456HSAD252
789-HRA-A789HRAA193
789-HRA-B789HRAB512
789-HCRA-B789HCRAB88
789-HRA-C789HRAC69
789-HCRA-C789HCRAC126

 

What I'm trying to accomplish is to report on the Label for each Client and filter out the HSA Acct Type values for all.  Since this is one piece of a larger scorecard, I need to be able to filter on Client accross the entirety of the scorecard and rank the Label within each Client.  As you can see above this isn't being accomplished since it it ranking the Label across all Clients and Acct Types.  So based off the above data I would be looking for the data to be presented below as if it was filtered for each client. 

 

Client123     Client456     Client789    
 LabelCountRankRun TotalRun %  LabelCountRankRun TotalRun %  LabelCountRankRun TotalRun %
                    
 A1911958%  C4814891%  A1911938%
 B14233100%  B5253100%  C1823774%
 Total33     Total53     B13350100%
               Total50   

 

 

I tried using the "Running Total" quick measure, but it would not show an individual line for each summed Label, but rather it would show each instance of the Label as shown below in the table visualization.

 

LabelCountRun TotalRank
A19383
A12196
A679
A1115
B14325
B8188
B51012
B5512
C48661
C12186
C669

 

 

Any help would be greatly appreciated.

 

 

Thanks,
Eric

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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