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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
scoutmedic
Helper I
Helper I

Need Help Updating Query for New Error Rate Thresholds

Hi everyone,

Several months ago, I received a solution for calculating thresholds based on production and error rates, and it has worked flawlessly. Here is the solution:

 

scoutmedic_0-1737578010703.pngscoutmedic_1-1737578024111.png

 

Going forward, our organization will be evaluating and adjusting the allowable error rates based on data analysis. I would like to update the query to maintain existing error rates for past data while applying new thresholds to errors within the applicable date range. Below is the same data used previously, with an additional column for new acceptable error rates.

 

 

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) (Jan 1 - Jun 30Threshold (per 100 units) (Jul 1 - Dec 31
BrokenGlass0.20.25
BrokenMotor0.30.35
BrokenWheel0.10.15
Incorrect PartGear0.050.10
Incorrect PartMotor0.60.5
MissingHandle0.50.5
MissingPaint0.250.25
MissingWheel0.30.3

 

Can anyone help update the query to reflect these changes?

 

Thank you!

1 REPLY 1
Anonymous
Not applicable

Hi @scoutmedic 

 

I've understand your needs, but it's still not clear to me what's your expected result.

The first screenshot you provided was too blurry for me to see.

Please provide your expected result, It would be helpful to find out the solution.

Thanks for your cooperation!

 

 

Best Regards

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.