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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
WinkieDink87
Regular Visitor

Divide each single value of column 1 with a sum of values in column 2 for pie chart

Hi all. Using the data below, what I want to get is a percentage of the authorisedcount over the sum of receivedcount by country and month. So that in the pie chart when I create multiple slicers on Month and country (or other criterias) it will show the percentage of authcount/total receivecount depending on the selection. 

WinkieDink87_2-1718160087375.png

 

For instance if  we look at AU for May 2024, i would like to obtain the % value of 2141/8583 = 24.94% in the pie chart, in proportion to the other countries.

WinkieDink87_1-1718160008885.png

Thank you so much in advance and apologies as I am a begineer in PowerBI. 

5 REPLIES 5
Ray_Minds
Responsive Resident
Responsive Resident

PercentageAuthorisedOverReceived =
DIVIDE(
SUM(Data[authorisedcount]),
CALCULATE(
SUM(Data[receivedcount]),
ALLEXCEPT(Data, Data[Country], Data[Month])
),
0
)




Did I answer your question? Mark my post as a solution! This will help others on the forum!

Anonymous
Not applicable

Hi @rajendraongole1 ,

Thanks for the quick response.

Hi @WinkieDink87 ,

Please have  a try.

AuthPercentage =
SUM ( Data[authorisedcount] )
    / CALCULATE (
        SUM ( Data[receivedcount] ),
        ALLEXCEPT ( Data, Data[Country], Data[Month] )
    )

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

 

 

Good day @Anonymous and @Ray_Minds ,

 

Thank you for your response! The formulas didnt help to calculate the data of authorized count/SUM of received count depending on the Month and country. A sample table is as below:

Auth CountRec CountCountryMonth
100150AUJan-24
200250NZJan-24
300350SGJan-24
400450AUFeb-24
500550NZFeb-24
600650SGFeb-24

 

What I wish to get is :

 

For example if I select a slicer for AU, NZ and SG for Jan-24, I would like to see in a pie chart AU to reflect 100/(150+250+350)*100 = 13.33%. NZ to reflect 200/(150+250+350)*100 = 26.67% and SG to reflect 300/(150+250+350)*100 = 40%

I tried using the formulas provided but I am not getting the right calculation. May I ask if it could be something else I missed out?

 

Thank you so much!

 

WinkieDink87
Regular Visitor

Good day @rajendraongole1 thank you so much for your reply and help! However it didnt seem to help. The calculation doesnt seem to change when I select a different month period in my slicer. And the calculation number doesnt tally. 

rajendraongole1
Super User
Super User

Hi @WinkieDink87 -Create a measure based on the fields to calculate percentage of authorisedcount over the total receivedcount by country and month.

 

AuthPercentage =
DIVIDE(
    SUM('Piechart'[authorisedcount]),
    SUM('Piechart'[receivedcount]),
    0
) * 100
 
 
Able to see as per selection for AU for may month 24.94%,check the snapshot fyr.I hope it works. please check

 

 

rajendraongole1_1-1718163550665.png

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 





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

Proud to be a Super User!





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.

March2025 Carousel

Fabric Community Update - March 2025

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