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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jay_patel
Helper IV
Helper IV

Want to calculate % based on the values in total as well

Hi All,

Below is the scenario. here, i have applied calculation i.e., B/A*100 which is working fine for all rows but i want to get % value in total based on the total of Column A & B.

Column AColumn B
887888.63636364
625588.70967742
221881.81818182
906774.44444444
1116760.36036036
20018090
   
57346581.15183246

 

Desired Value in total is 81.151 which came by dividing sum of B by sum of A. but in power bi how to get that value (81.151) in total as well.

Thanks in advance

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@jay_patel ,

Can you try this in measure?

% = SUM(TableName[Column B])/SUM(TableName[Column A])




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

2 REPLIES 2
v-jingzhan-msft
Community Support
Community Support

Hi @jay_patel 

 

I guess your current % is a calculated column so it doesn't work correctly to get the total when you add it to a table or matrix visual in the report. To get the correct total, you need a measure instead. You can try the measure suggested by @Arul then format it to percentage. 

 

To learn how Power BI calculates total and subtotal values in tables and matrices, please refer to Understanding how Power BI calculates totals 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Arul
Super User
Super User

@jay_patel ,

Can you try this in measure?

% = SUM(TableName[Column B])/SUM(TableName[Column A])




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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