Forum Discussion
Calculate Percentage based on Matrix Columns
- 4 years ago
Like this?
Percentage = DIVIDE ( CALCULATE ( SUM ( Table1[Amount] ), Table1[Spending] = "MBE" ), CALCULATE ( SUM ( Table1[Amount] ), Table1[Spending] = "Expenditure" ) ) - 4 years ago
I'd recommend taking SPENDING off of the matrix columns and defining separate measures for MBE and Expenditure then putting all three measures in the visual. You can use the numerator and denominator of the measure I gave before to define these new measures.
Like this?
Percentage =
DIVIDE (
CALCULATE ( SUM ( Table1[Amount] ), Table1[Spending] = "MBE" ),
CALCULATE ( SUM ( Table1[Amount] ), Table1[Spending] = "Expenditure" )
)- joshig4 years agoFrequent Visitor
Thanks Alexis that works like a charm!! And now i realize the true power of Measures. Do you know how do I add it to the matrix so that it just shows up once as a column after 'MBE' in my visual. If i drop it under Values section the matrix makes it appear in three separate columns after each column that i have in my image above.
- AlexisOlson4 years agoSuper User
I'd recommend taking SPENDING off of the matrix columns and defining separate measures for MBE and Expenditure then putting all three measures in the visual. You can use the numerator and denominator of the measure I gave before to define these new measures.
- joshig4 years agoFrequent Visitor
Thanks again and really appreciate providing me a new perspective. It helped me a lot since i have just started my journey wth PBI.