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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
cdorgan
Regular Visitor

Finding corresponding value for the 50% point of a running total

I hope someone can help. I have transitioned a data set from Excel to Power BI and can get everything working except finding two numbers. The individual data is categorized by work category where I track the number of issues and cost of issues. To identify my high risk items, I first consolidate the individual items by category with total number of issues and total cost. I then do a running total on the both the cumulative issues and cumulative cost.

 

Here is a sample of the source data similar to what I have:

 

CategoryIssue CountCost
a15000
a12000
a1300
b110000
b13000
c1500
c10
c12300
c14000
d1500
e1250
e15000
e16000
e14000
e10
f14500
f12000
g1400
g11000
g10

 

Here is the consolidated data I do my analysis on:

 

CategoryTotal Issue CountTotal CostRT IssuesRT Cost
a3730037300
b213000520300
c46800927100
d15001027600
e5152501542850
f265001749350
g314002050750
  50%1025375

 

What I am looking for is where the running total of the issue count is 10 - with the total issue count in ascending order.

 

I then want to find where the running total of the total cost is 25k - with the toal cost in ascending order.

 

In Excel I accomplish this as:

 

CategoryTotal Issue CountTotal CostRT IssuesRT Cost
d15001500
b213000313500
f26500520000
a37300827300
g314001128700
c468001535500
e5152502050750

 

For issue count, therefore any category with 3 or more issues is of higher risk.

 

CategoryTotal Issue CountTotal CostRT IssuesRT Cost
d15001500
g3140041900
f2650068400
c468001015200
a373001322500
b2130001535500
e5152502050750

 

For cost, it is any category with a cost of 7300 or more.

 

The end result, only category a and e are high risk for what I have to focus on.

 

Long questions short - is there anyway in Power BI to find the "3" and "7300" values?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @cdorgan 

I transform your data in Power Query Editor

1.png

Use Group By and Sort the table by Count TotalAscending

Result

2.png

Then add an index column:

3.png

Now lets build two calculated columns (Cost RT Issues and RT Cost)

Cost RT Issues = CALCULATE(SUM(Table1[Total Issue]),FILTER(ALL(Table1),Table1[index]<=EARLIER(Table1[index])))
RT Cost = CALCULATE(SUM(Table1[CountTotal]),FILTER(Table1,Table1[Index]<=EARLIER(Table1[Index])))

Result is as below:

4.png

Then build measures to find a which is the first Category larger than 10.

50%Count = CALCULATE(SUM(Table1[CountTotal]),ALLSELECTED(Table1))*0.5
50%Issue = CALCULATE(SUM(Table1[Total Issue]),ALLSELECTED(Table1))*0.5
Measure = IF(SUM(Table1[Cost RT Issues])>Table1[50%Issue],MAX(Table1[Category]),BLANK())

Result:

5.png

Now we found a and we just need to find the Category whose total Issue >=3 and Count Total>=7300.

Measure 2 = CALCULATE(MAX(Table1[Category]),Table1[Total Issue]>=3,Table1[CountTotal]>=7300)

Result:

6.png

If this reply still can't help you to solve your problem, please tell me your calculate logic about how to find a or provide me with more details about your issue just like an issue Screenshot.

You can download the pbix file form this link:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/tongzhou_qiuyunus_onmicrosoft_com/EYmJZHU0S9ZMhYHm...

 

Best Regards,

Rico Zhou

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

1 REPLY 1
Anonymous
Not applicable

Hi @cdorgan 

I transform your data in Power Query Editor

1.png

Use Group By and Sort the table by Count TotalAscending

Result

2.png

Then add an index column:

3.png

Now lets build two calculated columns (Cost RT Issues and RT Cost)

Cost RT Issues = CALCULATE(SUM(Table1[Total Issue]),FILTER(ALL(Table1),Table1[index]<=EARLIER(Table1[index])))
RT Cost = CALCULATE(SUM(Table1[CountTotal]),FILTER(Table1,Table1[Index]<=EARLIER(Table1[Index])))

Result is as below:

4.png

Then build measures to find a which is the first Category larger than 10.

50%Count = CALCULATE(SUM(Table1[CountTotal]),ALLSELECTED(Table1))*0.5
50%Issue = CALCULATE(SUM(Table1[Total Issue]),ALLSELECTED(Table1))*0.5
Measure = IF(SUM(Table1[Cost RT Issues])>Table1[50%Issue],MAX(Table1[Category]),BLANK())

Result:

5.png

Now we found a and we just need to find the Category whose total Issue >=3 and Count Total>=7300.

Measure 2 = CALCULATE(MAX(Table1[Category]),Table1[Total Issue]>=3,Table1[CountTotal]>=7300)

Result:

6.png

If this reply still can't help you to solve your problem, please tell me your calculate logic about how to find a or provide me with more details about your issue just like an issue Screenshot.

You can download the pbix file form this link:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/tongzhou_qiuyunus_onmicrosoft_com/EYmJZHU0S9ZMhYHm...

 

Best Regards,

Rico Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors