Forum Discussion
LYeo87
1 year agoHelper 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 us...
- 1 year ago
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!
wardy912
1 year agoSuper User
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!