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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Obtaining the correct % of a column when using a slicer

Hi everyone,
I am trying to show the Nº of defficiencies (OK, KO, Pending) of a list of controls and I made the following measure: 

Defficiencies = 
DIVIDE(
CALCULATE(COUNT('Mapeo Heatmap'[Control Code]),'Mapeo Heatmap'[Rating conclusion]<>"OK" )
,
COUNT('Mapeo Heatmap'[Control Code])
)


It has to show the amount of controls that are not right, all good when using the slicer of "Control" or "Process", t
he problem appears when filtering with the SLICER [Rating conclusion] by KO, OK or Pending, that returns wrong data.
 
All Controls - correct measure 119/1848 = 6,44 % (119 no OK, 1729 OK)
jbqrn_6-1656502221024.png

OK - it has to show 0% of defficiencies - 0 controls / 1729 controls (filtered by the SLICER rating conclusion = "OK")

 
jbqrn_4-1656502070212.png

Pending - it has to show 100% - 31 controls "Pending"/31 controls (filtered by the SLICER rating conclusion = "PENDING")

jbqrn_2-1656501991377.png

KO - it has to show 100% - 88 controls "KO"/88 controls (filtered by the SLICER rating conclusion = "KO")

jbqrn_3-1656502035396.png


Data:

EntidadControl CodeRating conclusion
CorporativoELC-01KO
CorporativoELC-02Pending
CorporativoELC-03OK
CorporativoELC-04OK
CorporativoELC-05OK
CorporativoELC-06OK
CorporativoELC-07OK
CorporativoELC-08OK
CorporativoELC-09OK
CorporativoELC-10OK
CorporativoELC-11Pending
CorporativoELC-12OK
CorporativoELC-13Pending

 

Any possible solution?
Thanks in advice!!

 

3 REPLIES 3
SpartaBI
Community Champion
Community Champion

@Anonymous TRY:

Defficiencies = 
DIVIDE(
CALCULATE(COUNT('Mapeo Heatmap'[Control Code]),'Mapeo Heatmap'[Rating conclusion]<>"OK" )
,
CALCULATE(COUNT('Mapeo Heatmap'[Control Code]), REMOVEFILTERS('Mapeo Heatmap'[Rating conclusion])
)



2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

Anonymous
Not applicable

Hi @SpartaBI, thanks for the solution!

 

The problem is that if I apply the remove filters argument in the division, the number that is returned doesn't change when filtering with that slicer...
😞

 

@Anonymous no worries, I will PM you now

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.