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
LYeo87
Helper II
Helper II

% result errors using dax

Hello,

 

Im trying to gain a % of audit items when the audit item result is 'complaint' - it works fine when i use the full data set. But as soon as I use a slicer it through the figures.

Dax used is:

% = [6) Count of Audit Item ID for Compliant]/[2) AUDIT ITEMS DISTINCT COUNT NO RESULT FILTER)]
6) Count of Audit Item ID for Compliant =
CALCULATE(
    DISTINCTCOUNT('Dynamics - Pbi HSE_Audit_Inspections_LC'[Audit Item ID]),
    'Dynamics - Pbi HSE_Audit_Inspections_LC'[Audit Item Result]
        IN { "Compliant" }
)

2) AUDIT ITEMS DISTINCT COUNT NO RESULT FILTER) = CALCULATE([1) AUDIT ITEMS ID DISTINCT)],REMOVEFILTERS('Dynamics - Pbi HSE_Audit_Inspections_LC'[Audit Item Result]))

Any advice?

 

Correct:

LYeo87_0-1755179620644.png


Incorrect when slicing:

LYeo87_1-1755179659941.png

 





1 ACCEPTED SOLUTION
wardy912
Solution Sage
Solution Sage

Hi @LYeo87 

 

 It looks like you're only removing filters from the audit item result column, so other slicers will be changing the result. Try this:

 

% Compliant = 
DIVIDE(
    CALCULATE(
        DISTINCTCOUNT('Dynamics - Pbi HSE_Audit_Inspections_LC'[Audit Item ID]),
        'Dynamics - Pbi HSE_Audit_Inspections_LC'[Audit Item Result] = "Compliant"
    ),
    DISTINCTCOUNT('Dynamics - Pbi HSE_Audit_Inspections_LC'[Audit Item ID])
)

 

 I hope this helps, please give a thumbs up and mark as solved if it does, thanks!

View solution in original post

4 REPLIES 4
v-echaithra
Community Support
Community Support

Hi @LYeo87 ,

May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

Thank you.

v-echaithra
Community Support
Community Support

Hi @LYeo87 ,

I hope the information provided is helpful.I wanted to check whether you were able to resolve the issue with the provided solutions.Please let us know if you need any further assistance.

Thank you.

v-echaithra
Community Support
Community Support

Hi @LYeo87 ,

Thank you @wardy912  for your inputs.
We’d like to follow up regarding the recent concern. Kindly confirm whether the issue has been resolved, or if further assistance is still required. We are available to support you and are committed to helping you reach a resolution.

Thank you for your patience and look forward to hearing from you.

Best Regards,
Chaithra E.

wardy912
Solution Sage
Solution Sage

Hi @LYeo87 

 

 It looks like you're only removing filters from the audit item result column, so other slicers will be changing the result. Try this:

 

% Compliant = 
DIVIDE(
    CALCULATE(
        DISTINCTCOUNT('Dynamics - Pbi HSE_Audit_Inspections_LC'[Audit Item ID]),
        'Dynamics - Pbi HSE_Audit_Inspections_LC'[Audit Item Result] = "Compliant"
    ),
    DISTINCTCOUNT('Dynamics - Pbi HSE_Audit_Inspections_LC'[Audit Item ID])
)

 

 I hope this helps, please give a thumbs up and mark as solved if it does, thanks!

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.