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
lotus22
Helper III
Helper III

Measure not working as intented

I have the following calculation and the table. For some reason, LO is not showing on for FTT% by Weld. I know why because the Fail calculation is zero. I do not how to show it on the graph as red because the weld has failed.

 

Part NumberManufacturing Date:Manufacturing Time:F/O, M/O, L/O, Adjustment:Weld NumberPass/Failweeknumber     
ABC5/9/20211:00 PMMOWELDAPass20     
ABC5/9/202110:00 PMLOWELDAPass20     
XYZ5/9/202110:00 PMLOWELDAFailed20     
XYZ5/9/20214:20 AMAdjustmentWELDAPass20     
XYZ5/9/20211:00 PMMOWELDAPass20     
            
Measures           
 Pass = calculate(count('Attribute Data'[Weld Number]),'Attribute Data'[Pass/Fail]="Pass")     
 Fail = calculate(count('Attribute Data'[Weld Number]),'Attribute Data'[Pass/Fail]="Failed")     
 FTT% By Welds = (Divide([Pass],([Pass]+[Fail])))       
 color = if([FTT% By Welds]<1,"Red","Green")       
            

 

As you can see below LO is not showing up on the graph for Weld "Weld A" and Part number XYZ

lotus22_0-1620690800734.png

 

 

1 ACCEPTED SOLUTION
nilimarodrigues
Helper III
Helper III

Hello,

 

What if you update your FTT% By Welds formula to below:

 

FTT% By Welds = if(Divide([Pass],([Pass]+[Fail]))=0,0.00001,Divide([Pass],([Pass]+[Fail])))
 
Basically, you are giving a dummy value 0.00001 in case the division is going to result in value 0. That way, LO can be plotted on the chart:
 
nilimarodrigues_0-1620693193466.png

 

Kindly give Kudos if my reply helps!

 

Thanks

View solution in original post

1 REPLY 1
nilimarodrigues
Helper III
Helper III

Hello,

 

What if you update your FTT% By Welds formula to below:

 

FTT% By Welds = if(Divide([Pass],([Pass]+[Fail]))=0,0.00001,Divide([Pass],([Pass]+[Fail])))
 
Basically, you are giving a dummy value 0.00001 in case the division is going to result in value 0. That way, LO can be plotted on the chart:
 
nilimarodrigues_0-1620693193466.png

 

Kindly give Kudos if my reply helps!

 

Thanks

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.