Reply
dofrancis3
Helper III
Helper III

Calculate percentage

Dear Team;

I would like to request your support.

How can i calculate the percentage? (Dax). In case I have the tables (1srt one OR second one) below :

dofrancis3_0-1732611253768.png

 

Thank you

1 ACCEPTED SOLUTION

@dofrancis3 , Update measure as 

 

Percentage of Total1 =
VAR TotalSum = [Total1]  -- Assuming [Total1] is your measure
VAR GrandTotal = CALCULATE([Total1], ALL('Table'))
RETURN
DIVIDE(TotalSum, GrandTotal) * 100
 
Attached updated PBIX considering Total as measure



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

6 REPLIES 6
powerbidev123
Responsive Resident
Responsive Resident

Hi @dofrancis3 , Do you mean you need values like for eg.

Age group   F        M

<60 ans      52%    48%

Kedar_Pande
Super User
Super User

@dofrancis3 

Assuming you want to calculate the percentage of cases based on Gender in the first table:

Create measures:

Total Cases = SUM('YourTableName'[Case]) 
Total Cases Female = 
CALCULATE (
[Total Cases],
'YourTableName'[Gender] = "F"
)
Total Cases Male = 
CALCULATE (
[Total Cases],
'YourTableName'[Gender] = "M"
)
Percentage Female = 
DIVIDE (
[Total Cases Female],
[Total Cases],
0
)
Percentage Male = 
DIVIDE (
[Total Cases Male],
[Total Cases],
0
)

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

 

Dear @Kedar_Pande Thank you for your replay but i would like to calculate only the percentage of total cases

dofrancis3_0-1732612194816.png

 

@dofrancis3 , Try creating a measure like

 

Percentage of Total =
DIVIDE(
    SUM('Table'[Total]),
    CALCULATE(SUM('Table'[Total]), ALL('Table'))
) * 100
 
PBIX file attached with solution



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Dear @bhanu_gautam Thank you but note that this is a Mesure it's not a column.

So, please how to calculate a percentage in case Total is a mesure

dofrancis3_0-1732618817674.png

 

@dofrancis3 , Update measure as 

 

Percentage of Total1 =
VAR TotalSum = [Total1]  -- Assuming [Total1] is your measure
VAR GrandTotal = CALCULATE([Total1], ALL('Table'))
RETURN
DIVIDE(TotalSum, GrandTotal) * 100
 
Attached updated PBIX considering Total as measure



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






avatar user

Helpful resources

Announcements
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.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)