Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
This post has closed.
@Anonymous Well, here is the code cleaned up:
Yield %_latest_total =
IF (
( Fact_Yield_Detail_Latest[Item_Group_deduce] = "AP3" )
|| ( Fact_Yield_Detail_Latest[Item_Group_deduce] = "AF1" ),
CALCULATE (
SUM ( Fact_Yield_Detail_Latest[Good_Qty] ),
Fact_Yield_Detail_Latest[Process_Description] = "Double Check"
)
/ CALCULATE (
SUM ( Fact_Yield_Detail_Latest[Start_Qty] ),
Fact_Yield_Detail_Latest[Process_Description] = "Lathe Cutting"
),
IF (
Fact_Yield_Detail_Latest[Item_Group_deduce] = "SP2 (toric)"
|| ( Fact_Yield_Detail_Latest[Item_Group_deduce] = "SP2 (non-toric)" ),
CALCULATE (
SUM ( Fact_Yield_Detail_Latest[Good_Qty] ),
Fact_Yield_Detail_Latest[Process_Description] = "Double Check"
)
/ CALCULATE (
SUM ( Fact_Yield_Detail_Latest[Start_Qty] ),
Fact_Yield_Detail_Latest[Process_Description] = "UV mould prep"
),
0
)
)
What I would suggest is to return hard coded values for each possible condition. Then you can check your logic.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 3 | |
| 2 | |
| 2 |