cancel
Showing results for
Search instead for
Did you mean:
Frequent Visitor

## Calculated column with sum per month by product

Hi all! Help me, please.

I have a table. I want to create a custom column for calculating the sailing sum per month by each product.

The value in each row of "Custom_Column" is the sailing sum per month by each product. I need help to write DAX construction for the "Custom_Column" creation.

My vision of this table looks like

 ProductID SaleCount Date Custom_Column 1 5 2019-01-01 24 1 8 2019-01-02 24 1 11 2019-01-03 24 2 6 2019-01-01 14 2 3 2019-01-02 14 2 5 2019-01-03 14 1 4 2019-02-01 13 1 6 2019-02-02 13 1 3 2019-02-03 13 2 1 2019-02-01 12 2 5 2019-02-02 12 2 6 2019-02-03 12

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

## Re: Calculated column with sum per month by product

hi @maximus84 ,

Please check this measure.

`Product Sum = CALCULATE(SUM('Table (2)'[SaleCount]),ALLEXCEPT('Table (2)','Table (2)'[ProductID]))`

regards,

Naveen

5 REPLIES 5
Helper I

## Re: Calculated column with sum per month by product

Use Group By Feature
Frequent Visitor

## Re: Calculated column with sum per month by product

I am new to DAX. Can you show an example?

Anonymous
Not applicable

## Re: Calculated column with sum per month by product

hi @maximus84 ,

Please check this measure.

`Product Sum = CALCULATE(SUM('Table (2)'[SaleCount]),ALLEXCEPT('Table (2)','Table (2)'[ProductID]))`

regards,

Naveen

Frequent Visitor

## Re: Calculated column with sum per month by product

Thanx a lot to @Anonymous

Anonymous
Not applicable

## Re: Calculated column with sum per month by product

welcome @maximus84

## Helpful resources

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors