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
Anonymous
Not applicable

How to calculate % of total for a column over time series?

I need help in calculating % of the total for a column over time. I have used this dax to calculate it for "Country" 

DIVIDE(SUM(Sheet1[Value]),CALCULATE(SUM(Sheet1[Value]),Sheet1[Country] in {"USA","Canada"}),0) since I had only 2 countries I was able to plug in those values into my "in" condition but I don't want to plug in all my states into my  "in" condition. 
 
Please see the below picture
 

Capture1.PNG

1 ACCEPTED SOLUTION
ahmedoye
Responsive Resident
Responsive Resident

Hi @Anonymous , to make your DAX easier to read and write, break it down this way:

  1. Amount = SUM(Sheet1[Value])
  2. State Grand Total =  CALCULATE([Amount], ALL(Sheet1[States]))
  3. % of Grand Total = DIVIDE([Amount], [State Grand Total], 0)

Remember to format your measure as a percentage afterwards.

 

If this solves your question, kindly mark it as a solution.

View solution in original post

2 REPLIES 2
ahmedoye
Responsive Resident
Responsive Resident

Hi @Anonymous , to make your DAX easier to read and write, break it down this way:

  1. Amount = SUM(Sheet1[Value])
  2. State Grand Total =  CALCULATE([Amount], ALL(Sheet1[States]))
  3. % of Grand Total = DIVIDE([Amount], [State Grand Total], 0)

Remember to format your measure as a percentage afterwards.

 

If this solves your question, kindly mark it as a solution.

Anonymous
Not applicable

Thanks. This worked.

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.