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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Bullet_Train95
Frequent Visitor

Percentage of Total Tooltip not returning the correct results for Bar Chart

Hi all,

 

I'm trying to create a tooltip that returns the percentage(proportion) of the total amount for each distinct company in a bar chart.

 

I've created a measure with the following DAX code to use as a tooltip:

% of total = SUM('Contract Register Sheet'[Original Value])/CALCULATE(SUm('Contract Register Sheet'[Original Value]),ALL('Contract Register Sheet'[Company/Individual Name]))*100

 

When I create a table visual that lists each individual Company and add this measure to that table, it responds with the correct results.

When I hover over each individual Company in the Bar chart to view the tooltip results, I'm getting wierd numbers. Basically, I'm getting a denominator which only contains the value of that highlighted company WITHOUT any page filters 

 

I've also tried the following DAX functions and they havent provide the correct results:

 

CALCULATE(SUM('Contract Register Sheet'[Original Contract/SOW Value in NZD]),ALLEXCEPT('Contract Register Sheet', 'Contract Register Sheet'[Company/Individual Name]))/CALCULATE(SUM('Contract Register Sheet'[Original Contract/SOW Value in NZD]),ALL('Contract Register Sheet'))
 
Would appreciate your help. 
3 REPLIES 3
amitchandak
Super User
Super User

@Bullet_Train95 , Try like

 

% of total = divide(SUM('Contract Register Sheet'[Original Value]),CALCULATE(SUm('Contract Register Sheet'[Original Value]),ALL('Contract Register Sheet')))*100

 

 

No need to multiply by 100, you can mark it as % column

Percent of Total and Percent of SubTotal https://www.youtube.com/watch?v=6jTildcV2ho
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=24270s

Hi there,

 

When I use

% of total = divide(SUM('Contract Register Sheet'[Original Value]),CALCULATE(SUm('Contract Register Sheet'[Original Value]),ALL('Contract Register Sheet')))

The value ends up being double the correct value for some reason. Why is that?

 

 

 

 

Hi @Bullet_Train95 ,

In order to get a better understanding on your requirement and give you a suitable solution, could you please provide some raw data in your tables (exclude sensitive data) with Text format, your visual settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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