Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Subtracting different columns with one specific column

Hello!

 

I am currently working on a matrix with dates and sum of counts of products.

Row: Product

Column: Date

Values: Sum of Count of Products Sold

 AprilMayJuneJulyAugustSeptemberOctober
Product A4533322231343215
Product B55110056
Product C9001100
Product D4176535677122233

 

I would like my new matrix to have the delta value of Sum of Products Sold for the month and Sum of Products Sold in April

 

 MayJuneJulyAugustSeptemberOctober
Product A288177268-2-24-40
Product B-54-54-55-55-50-49
Product C-9-9-8-8-9-9
Product D3512153681192

 

I have created the following measure to achieve this:

Sum of Products = SUM(Product[Product Count])

Sum of Products April = CALCULATE(Sum Of Products, Date_Full_Table[Month_Year] = "April 2020")

Delta = Sum of Products - Sum of Products April

 

However I get the following result instead

 AprilMayJuneJulyAugustSeptemberOctober
Product A033322231343215
Product B0110056
Product C0001100
Product D076535677122

233

 

Let me know what should be changed to get me the result I want

 

I highly appreciate your recommendations and help!

  • @_ssssaaarra, The formula seems correct, you can try this change

    Sum of Products April - CALCULATE(Sum of Products,filter(all(Date_Full_Table), Date_Full_Table[Month_Year] - "April 2020"))

    [Delta - Sum of Products]- [Sum of Products April]

    But I doubt it's because you use only month, mutiple year getiing data added

2 Replies

  • @_ssssaaarra, The formula seems correct, you can try this change

    Sum of Products April - CALCULATE(Sum of Products,filter(all(Date_Full_Table), Date_Full_Table[Month_Year] - "April 2020"))

    [Delta - Sum of Products]- [Sum of Products April]

    But I doubt it's because you use only month, mutiple year getiing data added

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you!!!

      It works!