Forum Discussion
pmdci
Advocate V
10 years agoShowing percentage values in visuals
Hi there, I have created measures in the past based on COUNTX which when combined with COUNTROWS I can create some percentage measures. For instance if I do a count of all rows where PRODUCT = "A...
- 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()