Forum Discussion

jackj's avatar
jackj
Helper I
4 years ago
Solved

Calculated Column for sum between two dates

All,   I have a very simple data set with the following columns:   UserID Week Ending Week Ending - 28 Days (a calculated column that takes the week ending and subtracts 28 days) Week Ending -...
  • v-xiaotang's avatar
    4 years ago

    Hi jackj 

    you can try this,

    Calculated Column = CALCULATE(SUM('Table'[Subtotal Sales]),FILTER(ALL('Table'),EARLIER('Table'[Week Ending])<'Table'[Week Ending - 28 Days ]&&EARLIER('Table'[Week Ending])>='Table'[Week Ending - 364 Days]))

    result

     

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.