Forum Discussion
Massingc1983
2 years agoFrequent Visitor
Filtered DAX Measure
Hi I am trying to work out a percentage based on filtered measures. The first measure is number of "Active" suppliers. The second is number of those active suppliers who are marked as "High Risk"...
Anonymous
2 years agoNot applicable
Hi Massingc1983 ,
I don't suggest you to use "ActiveSuppliers" part in "ABCHighRiskSuppliers", use DISTINCTCOUNT() function again in "ABCHighRiskSuppliers".
Active Supplier ABC =
VAR _ActiveSuppliers =
CALCULATE (
DISTINCTCOUNT ( 'Contract Append'[Supplier name] ),
'Contract Append'[Status] = "Active"
)
VAR _ABCHighRiskSuppliers =
CALCULATE (
DISTINCTCOUNT ( 'Contract Append'[Supplier name] ),
'Contract Append'[Status] = "Active",
'Contract Append'[2.2 Modern Slavery Risk Rating] = "High"
)
RETURN
DIVIDE ( _ABCHighRiskSuppliers, _ActiveSuppliers )
It works on myside. My Sample:
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Massingc1983
2 years agoFrequent Visitor
Thank you, this helped!