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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to calculate percentage by group row...

I have the followig data model:

Name 1 $ 30,000.00
    Product 1 $ 10,000.00
    Product 2 $ 20,000.00
Name 2 $ 50,000.00
    Product 1 $ 40,000.00
    Product 2 $ 10,000.00
Total $ 80,000.00

 

I need to calculate the % of each line grouped by Name in order to have the following:

Name 1 $ 30,000.00100%
    Product 1 $ 10,000.0033%
    Product 2 $ 20,000.0067%
Name 2 $ 50,000.00100%
    Product 1 $ 40,000.0080%
    Product 2 $ 10,000.0020%
Total $ 80,000.00 

 

I could only manage to show the % based on the grand total, but I need exaclty what I´m showing above. Any idea?

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

Is your table like below?

How to calculate percentage by group row2.PNG

If so, you can create your measure like so:

Percent =
DIVIDE (
    SUMX ( 'Table', 'Table'[Value] ),
    CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Name] ) )
)

How to calculate percentage by group row.PNG

Best Regards,
Icey

 

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

2 REPLIES 2
Icey
Community Support
Community Support

Hi @Anonymous ,

Is your table like below?

How to calculate percentage by group row2.PNG

If so, you can create your measure like so:

Percent =
DIVIDE (
    SUMX ( 'Table', 'Table'[Value] ),
    CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Name] ) )
)

How to calculate percentage by group row.PNG

Best Regards,
Icey

 

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

amitchandak
Super User
Super User

Please refer

https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
Thanks.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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