cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
maximus84
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

ProductIDSaleCountDateCustom_Column
152019-01-0124
182019-01-0224
1112019-01-0324
262019-01-0114
232019-01-0214
252019-01-0314
142019-02-0113
162019-02-0213
132019-02-0313
212019-02-0112
252019-02-0212
262019-02-0312

 

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]))

Capture.JPG

 

regards,

Naveen

View solution in original post

5 REPLIES 5
amkhullar Helper I
Helper I

Re: Calculated column with sum per month by product

Use Group By Feature
maximus84
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]))

Capture.JPG

 

regards,

Naveen

View solution in original post

maximus84
Frequent Visitor

Re: Calculated column with sum per month by product

Thanx a lot to @Anonymous 

Highlighted
Anonymous
Not applicable

Re: Calculated column with sum per month by product

welcome @maximus84 

Helpful resources

Announcements
New Ranks Launched March 24th!

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!

‘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

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.

Community Summit North America

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