March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
1. I need to get how many "No Ok" there are of every checkpoint (1 - 12)
2. Then i need to get the worst checkpoint of all (in this case 8, 4, 3...)
3. Later be able to filter by product so i can now which one is the worse of each product.
Product/Punto | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Product 1 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 2 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 3 | Ok | Ok | No Ok | No Ok | Ok | Ok | Ok | No Ok | Ok | Ok | Ok | Ok |
Product 1 | Ok | Ok | Ok | Ok | No Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 2 | Ok | No Ok | Ok | No Ok | Ok | Ok | Ok | No Ok | Ok | Ok | Ok | Ok |
Product 1 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | No Ok | Ok | Ok | Ok | Ok |
Product 1 | Ok | No Ok | Ok | No Ok | Ok | Ok | Ok | No Ok | Ok | Ok | Ok | Ok |
Product 2 | Ok | Ok | No Ok | No Ok | Ok | Ok | Ok | No Ok | Ok | Ok | Ok | Ok |
Product 1 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 1 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 2 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 2 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 1 | Ok | Ok | Ok | Ok | No Ok | Ok | Ok | No Ok | Ok | Ok | Ok | Ok |
Product 2 | Ok | No Ok | Ok | No Ok | No Ok | Ok | Ok | No Ok | Ok | Ok | Ok | No Ok |
Product 2 | Ok | N/A | N/A | N/A | Ok | Ok | Ok | N/A | Ok | Ok | Ok | Ok |
Product 3 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 3 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 1 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 3 | Ok | Ok | Ok | N/A | Ok | Ok | Ok | N/A | Ok | Ok | Ok | Ok |
Product 1 | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok | Ok |
Product 3 | Ok | No Ok | No Ok | No Ok | No Ok | Ok | Ok | No Ok | Ok | Ok | Ok | N/A |
Hi,
In the Query Editor, select the first column, right click and select "Unpivot Other Columns". Rename the attribute column to Checkpoint. Click on Close and Apply. Create a Table visual and drag the Product column there. Write these measures
Total = countrows(Data)
Not OK = calculate([Total],Data[Checkpoint]="Not OK")
You may sort the Not OK column in descending order to know the Products with the highest Not Ok cases.
Hope this helps.
Hi,
thanks,
when i unpivot the table i loss Columns Headers, i mean, in my table my headers are checkpoint (1, 2, 3,...) when pivoting i lose those headers, and i need them in order to know which one is the worse.
Also if i do it that way i can´t use later filtering (i have more column as region, supervisor, etc..) calc should work so when in visual object i use a filter calc updates.
The header get subsumed into a single Attribute column. If you have more columns, then select all columns other than the Check point columns and then "Unpivot Other Columns".
Can you share a couple photos how to do it? i don´t see what you mean
Hi @Alvaro_ACP__ ,
Below is my table:
The following DAX might work for you:
Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[1] = "No Ok"))
The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
thanks.
doing it this why it means i will have to make as many measures as columns i need to calculate (in my over 160 checkpoints) and also i need to order them in a table (or something similar) in order to get the 5 top worse of them.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |