Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello all,
I am working on creating a production yield dashboard. Dummy format of how my data looks is attached below. I wanted to calculate yield of each operation individually. As you can see, a particular unit id can be present multiple times in a column, however it is only present once in each operation. Can you guys help me in filtering out yield with respect to Operation? Yield basically is [(count of unique unit id in a particular operation that have a "pass" result) divided by (Count of total amount of unique unit id going into the operation)]
Solved! Go to Solution.
Hi @Anonymous ,
Please check:
Measure =
VAR Count_UnitID =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Unit ID] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] ),
'Table'[Status] = "pass"
)
)
VAR Count_ALL =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Unit ID] ),
ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] )
)
RETURN
DIVIDE ( Count_UnitID, Count_ALL )
Column =
VAR Count_UnitID =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Unit ID] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] ),
'Table'[Status] = "pass"
)
)
VAR Count_ALL =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Unit ID] ),
ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] )
)
RETURN
DIVIDE ( Count_UnitID, Count_ALL )
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please check:
Measure =
VAR Count_UnitID =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Unit ID] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] ),
'Table'[Status] = "pass"
)
)
VAR Count_ALL =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Unit ID] ),
ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] )
)
RETURN
DIVIDE ( Count_UnitID, Count_ALL )
Column =
VAR Count_UnitID =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Unit ID] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] ),
'Table'[Status] = "pass"
)
)
VAR Count_ALL =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Unit ID] ),
ALLEXCEPT ( 'Table', 'Table'[Cycle], 'Table'[Operation] )
)
RETURN
DIVIDE ( Count_UnitID, Count_ALL )
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Perhaps:
Measure =
VAR __Denominator = COUNTROWS('Table')
VAR __Numerator = COUNTROWS(DISTINCT(SELECTCOLUMNS(FILTER('Table',[Status]="pass"),"Unit ID",[Unit ID])))
RETURN
DIVIDE(__Numerator,__Denominator,0)
@Greg_Deckler
Thank you for the reply. I did try using this method and I see 100% yield for all the processes whiich is not the case.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 37 | |
| 34 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 74 | |
| 71 | |
| 37 | |
| 35 | |
| 25 |