Forum Discussion

Kate47537's avatar
Kate47537
Frequent Visitor
3 years ago
Solved

Formula Help

Hi,   I am trying to calculate products sales based on a 3 year (vitality date) (meaning the product has a start date and we measure sales from that date 36 months forward and then we stop tracking...
  • tamerj1's avatar
    3 years ago

    Hi Kate47537 

    please try

    NewMeasure =
    VAR CurrentDate =
        MAX ( 'Calendar'[Date] )
    RETURN
        SUMX (
            'Daily Sales',
            IF (
                CurrentDate < EOMONTH ( 'Daily Sales'[Marketing Intro Date], 36 ),
                'Daily Sales'[Product Sales],
                0
            )
        )