Forum Discussion

maximus84's avatar
maximus84
Frequent Visitor
7 years ago
Solved

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

 

  • Anonymous's avatar
    Anonymous
    7 years ago

    hi maximus84 ,

     

    Please check this measure.

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

     

    regards,

    Naveen

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    hi maximus84 ,

     

    Please check this measure.

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

     

    regards,

    Naveen

  • Anonymous's avatar
    Anonymous
    Not applicable
    Use Group By Feature
    • maximus84's avatar
      maximus84
      Frequent Visitor

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