Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Date | InspectStage | MO | Plant Number | Product | Fault Code | Week Num | Month | Qtr | Year |
01/01/01 | Test | 100111 | ABC100 | Product A | Pass | 1 | Jan | Q1 | 01 |
02/01/01 | Test | 100112 | ABC101 | Product A | Inc Wiring | 1 | Jan | Q1 | 01 |
02/01/01 | Test | 100112 | ABC101 | Product A | Fluid Leak | 1 | Jan | Q1 | 01 |
02/01/01 | Test | 100113 | XYZ100 | Product B | Pass | 1 | Jan | Q1 | 01 |
02/01/01 | Test | 100114 | XYZ101 | Product B | Fluid Leak | 1 | Jan | Q1 | 01 |
02/01/01 | Test | 100114 | XYZ101 | Product B | Inc Wiring | 1 | Jan | Q1 | 01 |
08/01/01 | Test | 100115 | ABC102 | Product A | Fluid Leak | 2 | Jan | Q1 | 01 |
08/01/01 | Test | 100115 | ABC102 | Product A | Fluid Leak | 2 | Jan | Q1 | 01 |
09/01/01 | Test | 100116 | XZY102 | Product B | Pass | 2 | Jan | Q1 | 01 |
Hi - Here is the table. What I am looking to calculate is -
By Week, Month, Qtr and Year
1) Qty of Fails (anything that doesn't have pass in the fault code field)
2) Qty Units that have fails
3) Qty Unit with 0 faults (Any line that has pass in the fault code field)
4) FPU (No of fails/Total Qty Units (qty unit with fails + qty unit with 0 fails))
5) FPY (No of units with 0 fails/Total Qty Units (qty unit with fails + qty unit with 0 fails))
I have a reasonable handle on calculating 1, 2 (using the MO number with a distinct count) and 3 but these are in different visuals. I am struggling to get it to calculate 4 and 5 as I cant get the DAX code or calculation to add a criteria into my distinct count to only count the MO's with a pass + MO's without stating pass
When I try to do in the same visual the table counts the fail lines as a fail.
I am looking to create a visual that shows the following -
Product | Qty Fails | Qty Units with Fails | Qty Units with no fails | FPU (Fails/(units with fails + units with no fails) | FPY (Qty units with no fails/(units with fails + units with no fails) | |
Product A | 4 | 2 | 1 | 1.33 | 33% | |
Product B | 2 | 1 | 2 | 0.66 | 66% |
Solved! Go to Solution.
Thanks. Is there a way to make the MO column the columns for counting distinct units based on having a fault or not?
Thanks you so much, I have spent weeks trying to solve this. It works as exactly as I need it to. I have accepted the solution above. Thanks again
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |