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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Chandrashekar
Resolver III
Resolver III

Dax : % of row total

Hello,

 

This is regarding to the link which posted earlier.

Link: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dax-of-row-total/td-p/3186082

PBIX: Sample File 

For S4 I need to get 50%(Ach) and 50%(Bre) but am getting wrong result. Kindly check on it

Chandrashekar_0-1684323411922.png

Regards,

Chandrashekar B

 

1 ACCEPTED SOLUTION

Hi @Chandrashekar ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create two measures. 

% of row total Bre = DIVIDE( MAX('Table'[Bre]),MAX('Table'[Ach]),0)
% of row total Ach = 1-'Table'[% of row total Bre]

(3) Then the result is as follows.

vtangjiemsft_0-1684476814418.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

6 REPLIES 6
v-tangjie-msft
Community Support
Community Support

Hi @Chandrashekar ,

 

From the previous post, the logic of the calculation is [of row total(Ach)]=ach/ach+bre and [of row total(Bre)]=bre/ach+bre, so for s4, ach=4/(4+2)=4/6=0.6667, which seems to be correct. Can you provide the logic for the calculation?

 

Best Regards,

Neeko Tang

Hello,

 

Can you help me in correcting DAX.

 

Regards,

Chandrashekar B

Hi @Chandrashekar ,

 

From the previous post, the logic of the calculation is [of row total(Ach)]=ach/ach+bre and [of row total(Bre)]=bre/ach+bre, so for s4, ach=4/(4+2)=4/6=0.6667, which seems to be correct. Can you provide the logic for the calculation?

 

Best Regards,

Neeko Tang

Hello,

 

For S4 Ach is 4 and Bre is 2 so I should get 50% achieved.

 

Regards,

Chandrashekar B

Hi @Chandrashekar ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create two measures. 

% of row total Bre = DIVIDE( MAX('Table'[Bre]),MAX('Table'[Ach]),0)
% of row total Ach = 1-'Table'[% of row total Bre]

(3) Then the result is as follows.

vtangjiemsft_0-1684476814418.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

Hello,

 

Thank you 🙂

Regards,

Chandrashekar B

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.