Forum Discussion

a68tbird's avatar
a68tbird
Icon for Resolver II rankResolver II
8 years ago
Solved

Calculate Sales Past 30 Days

Hello All -   I can't quite figure out why my formula isn't working here. I'm trying to calculate the sales from the past 30 months using the following:   TotalSales30Day = CALCULATE ( SUM ( O...
  • v-cherch-msft's avatar
    v-cherch-msft
    8 years ago

    Hi a68tbird

     

    It seems you may try to use below measure:

    TotalSales30Day =
    CALCULATE (
        SUM ( Orders[Quantity] ),
        DATESINPERIOD ( Orders[OrderDate], MAX ( Orders[OrderDate] ), -30, DAY )
    )

    Regards,

    Cherie