It can be achieved easily by creating a calculated field, here is how it goes:
- Create a calculated field :
-
Use calculation:
SUM(IIF(DAY(TODAY())-DAY([Order Date]) <=6, [Sales], 0))
-
Then you will get the sum of last 7 days as wanted.
Hope this helps you.
For an in-depth explanation check out Tableau Training Course details.