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
jammy123
New Member

Categories percentage based of different column total

Hello Power BI group,

 

This is my first post and question. I am looking to create a new measure which gives me the summary of categorized rows but will be as a percentage of a different column total. I have given an example shown below.

 

First 3 columns are already listed (date,code,cost). I have to create a new column/measure where I can express the cost of code in % of price total which is from a different column. Also summarize the code and create column giving the % of price total. Please help!

screenshot.JPG

 

 

 

 

 

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @jammy123,

 

If they are from one table, it could be like below.

Measure =
DIVIDE (
    SUM ( Table1[cost] ),
    CALCULATE ( SUM ( Table1[Price] ), ALL ( Table1 ) )
)

If they are from two tables, it could be different.

Measure =
DIVIDE ( SUM ( Table1[cost] ), SUM ( PriceTable[Price] ) )

Categories_percentage_based_of_different_column_total

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @jammy123,

 

If they are from one table, it could be like below.

Measure =
DIVIDE (
    SUM ( Table1[cost] ),
    CALCULATE ( SUM ( Table1[Price] ), ALL ( Table1 ) )
)

If they are from two tables, it could be different.

Measure =
DIVIDE ( SUM ( Table1[cost] ), SUM ( PriceTable[Price] ) )

Categories_percentage_based_of_different_column_total

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Measure =
DIVIDE (
    SUM ( Table1[cost] ),
    CALCULATE ( SUM ( Table1[Price] ), ALL ( Table1[code] ) )
)


 This worked for me. Thanks for your help @v-jiascu-msft

jammy123
New Member

Also, looking at creating a responsive graph based on the date input or period where the code % of total price changes

can someone help please?

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!

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.

Top Solution Authors
Top Kudoed Authors