cancel
Showing results for
Did you mean:
Highlighted
Post Prodigy

## How to sum excluding a column using a dax measure

Hi all

I need to sum the values for column called "% produced" for the columns plant and SKU.

When I do so the problem I have is that it will sum me the values for the months too. So a same facility and SKU can be repeated several times since they have several months.

How can I exlude the months from the sum for SKU and plant? I tried

``Measure = CALCULATE(SUM(Sheet2[% produced]),ALLEXCEPT(Sheet2,Sheet2[Month]))``

But didnt work, as the result should be 100%

In the right table of the above image and pbix, is the correct result.

pbix attached:

https://1drv.ms/u/s!ApgeWwGTKtFdhwfWKw-DCkf_cXf3?e=UXR16i

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV

## Re: How to sum excluding a column using a dax measure

@o59393 here is the measure

``Measure = SUMX ( SUMMARIZE ( Sheet2, Sheet2[Plant], Sheet2[SKU] ), CALCULATE ( MAX ( [% produced] ) ) ) ``

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Highlighted
Super User IV

## Re: How to sum excluding a column using a dax measure

@o59393 here is the measure

``Measure = SUMX ( SUMMARIZE ( Sheet2, Sheet2[Plant], Sheet2[SKU] ), CALCULATE ( MAX ( [% produced] ) ) ) ``

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Announcements

#### August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

#### Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

#### Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

#### Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors