Forum Discussion
Showing percentage values in visuals
- 10 years ago
You can't have totally dynamic percentages. You must define a base measure to use as numerator, and a measure that removes some filter context to create a denominator, you can then calculate the percentage using these components.
The following idiom should get you there:
Base = COUNTROWS( 'Table' ) Denominator = CALCULATE( [Base] ,ALLSELECTED() ) Percentage = DIVIDE( [Base], [Denominator] )Depending on your specific use case you may need to call out specific columns or tables in the ALLSELECTED()
You can't have totally dynamic percentages. You must define a base measure to use as numerator, and a measure that removes some filter context to create a denominator, you can then calculate the percentage using these components.
The following idiom should get you there:
Base =
COUNTROWS( 'Table' )
Denominator =
CALCULATE(
[Base]
,ALLSELECTED()
)
Percentage =
DIVIDE( [Base], [Denominator] )Depending on your specific use case you may need to call out specific columns or tables in the ALLSELECTED()
This worked beautifuly! Exactly what I was looking for. Thanks a lot for your help.
Regards,
P.