Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am trying to create a Data Quality Dashboard filtered by multiple criteria. I have the following two tables:
Error-Table:
uid | product | attribute |
1xxxx | Product 1 | Attr1 |
2xxxx | Product 2 | Attr1 |
3xxxx | Product 1 | Attr3 |
where the product column is joined from the next table:
All-Products-Table:
uid | product |
1xxxx | Product 1 |
2xxxx | Product 2 |
3xxxx | Product 1 |
4xxxx | Product 1 |
I want to display the quality of each attribute in a bar chart. But when I calculate the quality in a new column or table, I can no longer filter by product.
Using the example from the table above:
Attr1 occurs twice in the Error-Table for a total of 4 records in the All-Products-Table. The rel. error is 2/4 = 50%.
By using a filter I want to take a closer look at Product1: Now Attribute1 occurs once in the Error-Table for a total of 3 records in the All-Products-Table. The error would now be 1/3 = 33.3%.
What is the best way to solve this problem?
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a measure.
Measure =
var _countrows_allpro=COUNTROWS(ALLSELECTED('All-Products-Table'))
var _countrows_attribute=CALCULATE(COUNTROWS('Error-Table'),FILTER(ALLSELECTED('Error-Table'),[attribute]=MAX('Error-Table'[attribute])))
return DIVIDE(_countrows_attribute,_countrows_allpro)
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a measure.
Measure =
var _countrows_allpro=COUNTROWS(ALLSELECTED('All-Products-Table'))
var _countrows_attribute=CALCULATE(COUNTROWS('Error-Table'),FILTER(ALLSELECTED('Error-Table'),[attribute]=MAX('Error-Table'[attribute])))
return DIVIDE(_countrows_attribute,_countrows_allpro)
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |