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
scoutmedic
Helper I
Helper I

Calculated Threshold By Production and Error

Good afternoon, I'm new to PBI and developing reports for my organization. I've taken some basics courses and searched the forum, but I'm stumped. I'm trying to create a calculated threshold line on a bar chart based on production volume and acceptable error rates so we can see when a location exceeds the acceptable defect threshold. Here is sample data I'm working with:

 

Production

Cost CtrLocationDate

Volume

1

Chicago1/1/24

300

2Tokyo1/1/24500
3New York1/1/24200
1Chicago1/1/24450
2Tokyo1/1/24550
3New York1/1/24175
1Chicago1/1/24250
2Tokyo1/1/24500
3New York1/1/24300

Errors

Cost CtrDateCategoryPart
11/1/24BrokenWheel
11/1/24Incorrect PartGear
21/1/24MissingPaint
21/1/24BrokenWheel
31/1/24BrokenGlass
31/1/24MissingHandle
11/2/24Incorrect PartMotor
11/2/24Incorrect PartGear
21/2/24BrokenWheel
31/2/24Incorrect PartMotor

 

Thresholds

Error

PartThreshold (per 100 units)
BrokenGlass0.2
BrokenMotor0.3
BrokenWheel0.1
Incorrect PartGear0.05
Incorrect PartMotor0.6
MissingHandle0.5
MissingPaint0.25
MissingWheel0.3

 

 

Any ideas how this can be accomplished?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

you will want to expand your data model a bit.

 

lbendlin_0-1719452508797.png

and then you can use TREATAS to lookup the thresholds.

 

lbendlin_1-1719452542482.png

And compare against the actual error rate

lbendlin_2-1719452568278.png

 

 

 

 

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

you will want to expand your data model a bit.

 

lbendlin_0-1719452508797.png

and then you can use TREATAS to lookup the thresholds.

 

lbendlin_1-1719452542482.png

And compare against the actual error rate

lbendlin_2-1719452568278.png

 

 

 

 

That worked great! I was able to create a combo chart and add the Acutal field to the secondary Y-axis to show number vs actual allowed.

 

It took me a while (and some internet searching) to figure out how not to summarize the Threshold and Actual columns. The trick was creating them as measures, not columns.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.