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
Ortignano
Helper II
Helper II

Percentage by row total (similar to excel) in power BI

I have a table by categories and Year and I would calculate the category percentage by row total as in the picture.Test2.png

On the left a sample data, on the right what I have using formula below and in the bottom the expected result (I have only one table).

I use:
% of Total Measure = DIVIDE ( CALCULATE ( SUM ( Table1[Qtà fallita] ) ), CALCULATE ( SUM ( Table1[Qtà fallita] ), ALL ( Table1[Error type 2], Table1[Year] )),0)

But it doesn't work as it calculate the percentage of overall and not by row

2 ACCEPTED SOLUTIONS
Uzi2019
Super User
Super User

Hi @Ortignano 

 

Try below measure 

% of Total Measure =

DIVIDE ( CALCULATE ( SUM ( Table1[Qtà fallita] ) ), CALCULATE ( SUM ( Table1[Qtà fallita] ), ALLSELECTED ( Table1[Year] )),0)

 

% of Total Measure =

DIVIDE ( CALCULATE ( SUM ( Table1[Qtà fallita] ) ), CALCULATE ( SUM ( Table1[Qtà fallita] ), ALL ( Table1[Year] )),0)

 


Check this result every row total is having 100%

Uzi2019_0-1729149400180.png

 

 

I hope I answered your question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

Ortignano
Helper II
Helper II

Thank you, all the solutions works well!

View solution in original post

4 REPLIES 4
Ortignano
Helper II
Helper II

Thank you, all the solutions works well!

Anonymous
Not applicable

Hi @Ortignano 

 

It seems that you have gotten a solution. Could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

 

Best Regards    

Zhengdong Xu

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

Uzi2019
Super User
Super User

Hi @Ortignano 

 

Try below measure 

% of Total Measure =

DIVIDE ( CALCULATE ( SUM ( Table1[Qtà fallita] ) ), CALCULATE ( SUM ( Table1[Qtà fallita] ), ALLSELECTED ( Table1[Year] )),0)

 

% of Total Measure =

DIVIDE ( CALCULATE ( SUM ( Table1[Qtà fallita] ) ), CALCULATE ( SUM ( Table1[Qtà fallita] ), ALL ( Table1[Year] )),0)

 


Check this result every row total is having 100%

Uzi2019_0-1729149400180.png

 

 

I hope I answered your question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Kedar_Pande
Super User
Super User

try updating your measure like this:

% of Total by Row = 
DIVIDE(
SUM(Table1[Qtà fallita]),
CALCULATE(SUM(Table1[Qtà fallita]), ALLEXCEPT(Table1, Table1[Error type 2])),
0
)

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

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