cancel
Showing results for
Did you mean:
mohammedfareed2 Helper I

## 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. 1 ACCEPTED SOLUTION

Accepted Solutions
ahmedoye Resolver I

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

Hi @mohammedfareed2 , 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.

2 REPLIES 2
ahmedoye Resolver I

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

Hi @mohammedfareed2 , 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.

mohammedfareed2 Helper I

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

Thanks. This worked.

Announcements #### Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section. #### April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights. Top Solution Authors
Top Kudoed Authors
Users online (1,903)