Forum Discussion
Sales Between Two Days, Not Date.
- 4 years ago
Hi, it_akasjraj
You can try the following methods. Because I replied to your post on April 21, I subtracted three days from each today date to get the date of your original post on April 18.
Measure:
Today = CALCULATE(SUM('Table'[Sales Amount]),FILTER(ALL('Table'),[Product]="APPS"&&[Date]=TODAY()-3)) +CALCULATE(SUM('Table'[Sales Amount]),FILTER(ALL('Table'),[Product]="NON APPS"&&[Date]=TODAY()-3))Last 7 Days = CALCULATE(SUM('Table'[Sales Amount]),FILTER(ALL('Table'),[Product]="APPS"&&[Date]<=TODAY()-3-1&&[Date]>=TODAY()-3-7)) +CALCULATE(SUM('Table'[Sales Amount]),FILTER(ALL('Table'),[Product]="NON APPS"&&[Date]<=TODAY()-3-1&&[Date]>=TODAY()-3-7))Last 8 To 15 Days = CALCULATE(SUM('Table'[Sales Amount]),FILTER('Table',[Product]="APPS"&&[Date]<=TODAY()-3-8&&[Date]>=TODAY()-3-8-14)) +CALCULATE(SUM('Table'[Sales Amount]),FILTER('Table',[Product]="NON APPS"&&[Date]<=TODAY()-3-8&&[Date]>=TODAY()-3-8-14))Last 16 To 30 Days = CALCULATE(SUM('Table'[Sales Amount]),FILTER(ALL('Table'),[Product]="APPS"&&[Date]<=TODAY()-3-23&&[Date]>=TODAY()-3-37)) +CALCULATE(SUM('Table'[Sales Amount]),FILTER(ALL('Table'),[Product]="NON APPS"&&[Date]<=TODAY()-3-23&&[Date]>=TODAY()-3-37))More Than 30 Days = CALCULATE(SUM('Table'[Sales Amount]),FILTER(ALL('Table'),[Product]="APPS"&&[Date]<TODAY()-3-37)) +CALCULATE(SUM('Table'[Sales Amount]),FILTER(ALL('Table'),[Product]="NON APPS"&&[Date]<TODAY()-3-37))Is this what you expect? It can be compared with the data you expect.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi:
I added a few days to your dataset to bring to today. There is a Date Table with a Day Index on the attached file. This was used along with a measure selector table to obtain results. Should make it easy for user to select:-)
I hope this helps.
https://drive.google.com/file/d/1p27ItKxLyGYFc0eVol3q0hKfziEC5_9X/view?usp=sharing