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.
I have a matrix below showing the Pass % and Fail % of tests according to their test type:
However, as the matrix shows, it isn't showing the correct % per row. For example, Chemical failure rate should be 1.32% (128/9668) but it seems to be computing against the total number of tests (0.50% = 128/25395). The test group is based on a dimension related (1:M) to the data table.
How can I make it so that the % rates are computing based on the total tests in their test group and not against the total number of rows?
Solved! Go to Solution.
Hi @vicky_ ,thanks for the quick reply, I'll add further.
Hi @olimilo ,
You can try the following expression.The Table data is shown below:
Use the following DAX expression to create measures
Tests = COUNTROWS('Data')
TestFailed = COUNTROWS(FILTER('Data','Data'[Ispass] = "false"))
Measure = DIVIDE([TestFailed],[Tests],0)
Final output
Hi @vicky_ ,thanks for the quick reply, I'll add further.
Hi @olimilo ,
You can try the following expression.The Table data is shown below:
Use the following DAX expression to create measures
Tests = COUNTROWS('Data')
TestFailed = COUNTROWS(FILTER('Data','Data'[Ispass] = "false"))
Measure = DIVIDE([TestFailed],[Tests],0)
Final output
It's hard to debug without any given data, or DAX.
How did you calculate your (%) value?
If you've used measures, then you can usually just use DIVIDE([numerator measure], [denominator measure]).
or you can try use the visual calculations (if you've got a more up-to-date version of powerBI), which should handle the various filters you might have applier - https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-visual-calculations-overview
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 |
---|---|
72 | |
70 | |
55 | |
37 | |
31 |
User | Count |
---|---|
83 | |
64 | |
63 | |
49 | |
45 |