Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
olimilo
Continued Contributor
Continued Contributor

% of rows not calculating properly, row axis based on dimension

I have a matrix below showing the Pass % and Fail % of tests according to their test type:

olimilo_0-1715056252092.png

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?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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:

vzhouwenmsft_0-1715246415810.png

vzhouwenmsft_1-1715246564488.png

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

vzhouwenmsft_2-1715246644269.png

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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:

vzhouwenmsft_0-1715246415810.png

vzhouwenmsft_1-1715246564488.png

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

vzhouwenmsft_2-1715246644269.png

 

 

vicky_
Super User
Super User

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

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors