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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
wokka
Helper IV
Helper IV

Dax/method needed to calculate percentages from table

I'm trying to work out how to calculate percentages from a simple table in powerbi desktop.

 

I click on "Table" under visualizations and create a table.

Then I drag and drop a measure called 'Sales' into the table,

then drag and drop in a then drop in Sales_Confirmed  dimension,

then drag and drop in Month dimension into the table.

 

This is what it looks like after the table is built:

 

Month      Sales            Sales_Confirmed 

1               100,000       true

2               200,000       true

3               500,000       true

Total         800,000   

 

What I am trying to do is work out how to create a new column in the table that is the percentage of total for month 1,2 & 3.

So month 1 percentage would be   100000/800000 * 100 = 12.5%     and so on.

 

Then I need some way to calculate & add the percentage column values in the table itself as so I can graph them?

Where I get stuck is working out how to get 800,000 total value to use for a calculated column. 

I dont want to hard code in 800,000 as the page also has a slicer that can vary the year.

 

Can someone assist please? 

 

 

   

 

1 ACCEPTED SOLUTION
Vijay_Chethan
Super User
Super User

You can use ALL() function in dax
create a measure to calculate total sales irrespective of filter use
Total_sales=calculate(sum(sales),ALL('table_name'))
now for the percentage u can do the following
sales%=sum(sales)/Total_sales


if this helps please masrk as solution

View solution in original post

2 REPLIES 2
BIswajit_Das
Impactful Individual
Impactful Individual

Hello @wokka,
As per your requirement you're creating a calculated column and you need the total value i.e 800000
so Below is the DAX for calculated column which returns the total value;

total=
CALCULATE([sales], ALL('Table'))

If you need any further assistance please let me know.
Thanks & Regards.
 
Vijay_Chethan
Super User
Super User

You can use ALL() function in dax
create a measure to calculate total sales irrespective of filter use
Total_sales=calculate(sum(sales),ALL('table_name'))
now for the percentage u can do the following
sales%=sum(sales)/Total_sales


if this helps please masrk as solution

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.