Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello there,
I want to do something that seems simple, but I just can't figure it out.
I want to count instances where a value is >= 90% and also separately count values that are below that
I have this data in the table: Production:
Plant | Material | Production% |
Plant1 | Material1 | 0.8034 |
Plant2 | Material2 | 0.9532 |
Plant1 | Material3 | 0.9804 |
Plant1 | Material4 | 1.0000 |
Plant2 | Material5 | 0.7532 |
If Production% is >= 90% (.9000) then count it as 1 pass. If < 90% then count as 1 fail, and sum and display both in a Matrix like this:
Plant | Pass >=90 | Fail <90 |
Plant 1 | 2 | 1 |
Plant 2 | 1 | 1 |
Thanks.
Solved! Go to Solution.
Hi @Anonymous ,
You can create the following 2 measures for calculating the counts of instances( >= 90%) and instances( < 90%) separately, and put them on Values tab of matrix:
Pass =
CALCULATE (
COUNTROWS ( 'Production' ),
FILTER ( 'Production', 'Production'[Production%] >= 0.9 )
)
Fail =
CALCULATE (
COUNTROWS ( 'Production' ),
FILTER ( 'Production', 'Production'[Production%] < 0.9 )
)
Best Regards
Rena
Hi @Anonymous ,
You can create the following 2 measures for calculating the counts of instances( >= 90%) and instances( < 90%) separately, and put them on Values tab of matrix:
Pass =
CALCULATE (
COUNTROWS ( 'Production' ),
FILTER ( 'Production', 'Production'[Production%] >= 0.9 )
)
Fail =
CALCULATE (
COUNTROWS ( 'Production' ),
FILTER ( 'Production', 'Production'[Production%] < 0.9 )
)
Best Regards
Rena
Usually people prefer measures over calculated columns, but this might be a case where a calculated column would come in handy.
I'm a personal Power Bi Trainer I learn something every time I answer a question
The Golden Rules for Power BI
Help when you know. Ask when you don't!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
93 | |
85 | |
83 | |
72 | |
49 |
User | Count |
---|---|
142 | |
137 | |
110 | |
69 | |
55 |