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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vincentakatoh
Helper IV
Helper IV

Production Yield calculation

Hi, 

 

Trying to use BI to analyse Yield information of production. Sample data at the botom. I beleived below is useful to anyone using BI to analyse yield information. 

 

From previous post, learned to 1) duplicate data , 2) pivot column and c) index column. Generate below matrix. 

 

2017-04-07 21_23_34-Start.png

 

 

 

Questions

1) Line Yield DAX formula to calculate line yield rate (station yield = P/(P+F))

Line 1 yield = S1 yield * S2 yield = [2/(1+2)] * [1/(1+2)] = 22% <exclude stations with zero P and zero F>

Line 3 yield = S1 yield * S2 yield * S3 yield = [0/(0+3)] * [0/(0+2)] *[ 0/(0+1)] = 0% 

Line 4 yield = S1 yield * S3 yield * S4 yield = [2/(1+2)] * [1/(1+0)] * [2/2+0] = 67%

 

2) Area Yield DAX formula to calculate Area yield

Area yield = S1 yield * S2 yield * S3 yield * S4 yield = [6/(6+6)] * [2/(2+6)] *[ 1/(1+1)]*[ 2/(2+0)]

 

PS. Actual data has >50 stations (S1, S2, S3.... S50)

AreaLinestationtest results
SMTLine1S1P
SMTLine1S1F
SMTLine1S1P
SMTLine1S2F
SMTLine1S2F
SMTLine1S2P
SMTLine2S1P
SMTLine2S1F
SMTLine2S1P
SMTLine2S2F
SMTLine2S2F
SMTLine2S2P
SMTLine3S1F
SMTLine3S1F
SMTLine3S1F
SMTLine3S2F
SMTLine3S2F
SMTLine3S3F
SMTLine4S1P
SMTLine4S1F
SMTLine4S1P
SMTLine4S4P
SMTLine4S4P
SMTLine4S3P
1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @vincentakatoh,

 

Firstly, it's not supported to add a column on the most right of the matrix visual using a measure. Also there is no function to support recursive calculation. In your scenario, you need to hardcode S1 yield or S2 yield. For example, Line 1 yield = S1 yield * S2 yield = [2/(1+2)] * [1/(1+2)] = 22%. You can create the measure like below:

 

M1 = var P=LOOKUPVALUE('Table'[CountVal],'Table'[Line],MAX('Table'[Line]),'Table'[station],MAX('Table'[station]),'Table'[test results],"P")
var PS2=LOOKUPVALUE('Table'[CountVal],'Table'[Line],MAX('Table'[Line]),'Table'[station],"S2",'Table'[test results],"P")
var FS2=LOOKUPVALUE('Table'[CountVal],'Table'[Line],MAX('Table'[Line]),'Table'[station],"S2",'Table'[test results],MAX('Table'[test results]))
Return 
IF(MAX('Table'[Line])="Line1" && MAX('Table'[station])="S1" && MAX('Table'[test results])="F",
(P/(P+SUM('Table'[CountVal])))*(PS2/(PS2+FS2)),BLANK())

 

q3.PNG

 

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
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
v-qiuyu-msft
Community Support
Community Support

Hi @vincentakatoh,

 

Firstly, it's not supported to add a column on the most right of the matrix visual using a measure. Also there is no function to support recursive calculation. In your scenario, you need to hardcode S1 yield or S2 yield. For example, Line 1 yield = S1 yield * S2 yield = [2/(1+2)] * [1/(1+2)] = 22%. You can create the measure like below:

 

M1 = var P=LOOKUPVALUE('Table'[CountVal],'Table'[Line],MAX('Table'[Line]),'Table'[station],MAX('Table'[station]),'Table'[test results],"P")
var PS2=LOOKUPVALUE('Table'[CountVal],'Table'[Line],MAX('Table'[Line]),'Table'[station],"S2",'Table'[test results],"P")
var FS2=LOOKUPVALUE('Table'[CountVal],'Table'[Line],MAX('Table'[Line]),'Table'[station],"S2",'Table'[test results],MAX('Table'[test results]))
Return 
IF(MAX('Table'[Line])="Line1" && MAX('Table'[station])="S1" && MAX('Table'[test results])="F",
(P/(P+SUM('Table'[CountVal])))*(PS2/(PS2+FS2)),BLANK())

 

q3.PNG

 

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.