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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Resolver II
Resolver II

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

Age group   F        M

<60 ans      52%    48%

Kedar_Pande
Community Champion
Community Champion

@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






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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.