Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dynamic Date- Past X months data

Hi  I am working on sales data by month. Every month I get fresh monthly sales data, so I keep appending my query.    For example in November I have data: Data of company A: Month Sales 1...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi

     

    One way is to add a flag on your calendar that marks the last 3 month dates as true and the rest as false(1,0).

    Then 

    calculate(sum(expression) , Calendar[Past 3 Months Flag] = 1)

     

    Let me know if this helps.

    Tomas