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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
devdev
New Member

DAX for percentage values

I need percentage values as described in the table in the right side

devdev_0-1750935743939.png

For example : 

High -cost is showing 51%. This we are getting when we divide 171,915,156 / 335,631,725 

Similarly Medium-cost is showing 2% . This we are getting 7,920,658 / 335,631,725

 

How is this achievable using DAX?

 

8 REPLIES 8
v-sgandrathi
Community Support
Community Support

Hi @devdev,

 

Has your issue been resolved?
If the response provided by @FBergamaschi  addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.

If yes, kindly accept the useful reply as a solution and give us Kudos. It would be appreciated.

 

Thank you for your understanding!

FBergamaschi
Resolver I
Resolver I

% of Grand Total = 
DIVIDE(
    SUM(CostTable[CostReceiving]),
    CALCULATE(SUM(CostTable[CostReceiving]), ALL(CostTable[Cost Sending]))
)

 

I hope I typed the column name corectly, you do not want to remove all filters

 

If it works, please give kudos and mark as a solution

 

Thanks

% of Grand Total = 
DIVIDE(
    SUM(CostTable[CostReceiving]),
    CALCULATE(SUM(CostTable[CostReceiving]), ALL(CostTable[Cost Sending]), ALL( CostTable[Cost Receiving]))
)

 

Sorry I had forgotten another filter to remove

 

If it works, please give kudos and mark as a solution, if it does not please specify all the columns that are grouped in Filters, Rows and columns section of the pivot table

 

Thanks

@FBergamaschi , This doesnt work as well

 

v-sgandrathi
Community Support
Community Support

Hi @devdev,

Thank you for reaching out to the Microsoft Fabric Community Forum.

 

Create New measure

% of Grand Total = 
DIVIDE(
    SUM(CostTable[CostReceiving]),
    CALCULATE(SUM(CostTable[CostReceiving]), ALL(CostTable))
)

 

Format the measure

Select your new measure.

Navigate to Measure Tools > Format > Percentage.

Set it to display 2 decimal places, or adjust as needed.

 

Add the measure to the Matrix

Drag the % of Grand Total measure into the Values area of your Matrix.

This will instantly display both absolute values and percentages in separate lines for each region-category.

 

I have included the PBIX file that I created using the provided sample data. Kindly review it and confirm whether it aligns with your expectations.

 

If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!

 

Thank you.

Hi @v-sgandrathi , I am getting this error

devdev_0-1750941776049.png

The cost receiving column has text values 

Cookistador
Memorable Member
Memorable Member

Hi @devdev 

 

The following dax measure should make the calculation you need

 

Percentage of Total Cost =
DIVIDE(
SUM('YourTable'[CostValue]),
CALCULATE(
SUM('YourTable'[CostValue]),
ALL('YourTable'[CostCategory])
)
)

If it is not working, do not hesistate to show with many countries what you are trying to achieve

Hi @Cookistador , THis is not giving correct result
More examples for you below:

 

devdev_0-1750937035491.png

For Europe region:  501,679,459 / 752,307,107 gives 67%

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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