Forum Discussion
jackj
4 years agoHelper I
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 -...
- 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.
VahidDM
4 years agoSuper User
Hi jackj
It'd be better if you share sample of your data in a table format here, but please try this measure:
Sum = calculate(sum(table[Subtotal Sales]),filter(all(table),table[Week Ending]>=table[Week Ending - 364 Days]&&table[Week Ending]<=table[Week Ending - 28 Days]))
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!