Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
joshig
Frequent Visitor

Calculate Percentage based on Matrix Columns

I am working on Matrix visual and I have to calculate percentage based on the Column data. The data is represented below and I need a new column percentage that needs to be calculated for e.g for the first row as (101,533,231/619,191,731)*100.

 

I am trying figure out a measure for it but so far without much success. Any help would be appreciated.

 

Matrix.jpg

 

2 ACCEPTED SOLUTIONS
AlexisOlson
Super User
Super User

Like this?

Percentage =
DIVIDE (
    CALCULATE ( SUM ( Table1[Amount] ), Table1[Spending] = "MBE" ),
    CALCULATE ( SUM ( Table1[Amount] ), Table1[Spending] = "Expenditure" )
)

View solution in original post

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.

View solution in original post

4 REPLIES 4
AlexisOlson
Super User
Super User

Like this?

Percentage =
DIVIDE (
    CALCULATE ( SUM ( Table1[Amount] ), Table1[Spending] = "MBE" ),
    CALCULATE ( SUM ( Table1[Amount] ), Table1[Spending] = "Expenditure" )
)

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.

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.

Thanks again and really appreciate providing me a new perspective. It helped me a lot since i have just started my journey wth PBI.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.