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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ElvirBotic
Helper III
Helper III

Fix % when using slicer.

hello, Power BI Community, 

 

I am running into a problem I have not seen before. I was given an Excel file with roughly 1200 records. The goal is to calculate the % compliant. There is a column in the dataset that gives a status to each record. I have a few DAX measures to calculate the %. 

All records = COUNTROWS ( ComplianceData )
Status 1 Count  = CALCULATE ( COUNTROWS ( ComplianceData ), ComplianceData[Status] = "Compliant" )
% Compliant = DIVIDE ( Status 1 Count , All Records )

I have other DAX measures for each of the 4 different status but I am going to use the compliant status as an example. 

My problem is when I add in a slicer to slice by different status' how do I show the correct % based on that selection instead of displaying a result of 20,000% I know what is happening as it is dividing the "All Records" amount by the amount selected in the slicer, but I just do not know how to fix it to display correctly. 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ElvirBotic , Try with a small change in the second measure

 

Status 1 Count = CALCULATE ( COUNTROWS ( ComplianceData ), filter(ComplianceData, ComplianceData[Status] = "Compliant" ))


% Compliant = DIVIDE ([Status 1 Count] , [All Records] )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ElvirBotic , Try with a small change in the second measure

 

Status 1 Count = CALCULATE ( COUNTROWS ( ComplianceData ), filter(ComplianceData, ComplianceData[Status] = "Compliant" ))


% Compliant = DIVIDE ([Status 1 Count] , [All Records] )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Awesome that seemed to work. I do have a question when using the slicer to slice by different status' I have a matrix table with different DAX measures as columns and rows are broken into categories so I am able to get different % based off categories. 

 

When using the slicer it filters the matrix table and will show 100% when the original value was 8%. I understand I am telling it to show only records with "non compliant" data, but I would want to be able to see it still as the original and not 100% 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.