FormuHello,
I am trying to create a formula and filter data through the last Sunday. For example, the last Sunday was 8/11/24 so then everything after that is filtered out and everything 8/11/24 and before is kept.
Here is an example data that I have.
Date | ID |
8/13/2024 | 2197 |
8/12/2024 | 2908 |
8/11/2024 | 2704 |
8/10/2024 | 7694 |
8/9/2024 | 6240 |
8/8/2024 | 2401 |
8/7/2024 | 7944 |
8/6/2024 | 1585 |
8/5/2024 | 8351 |
8/4/2024 | 5293 |
8/3/2024 | 5667 |
8/2/2024 | 6502 |
8/1/2024 | 7662 |
7/31/2024 | 6032 |
7/30/2024 | 1580 |
7/29/2024 | 2885 |
7/28/2024 | 3141 |
7/27/2024 | 5198 |
7/26/2024 | 4980 |
7/25/2024 | 2847 |
7/24/2024 | 3656 |
7/23/2024 | 1657 |
7/22/2024 | 4147 |
7/21/2024 | 3879 |
7/20/2024 | 9078 |
7/19/2024 | 7338 |
7/18/2024 | 6126 |
7/17/2024 | 8279 |
7/16/2024 | 8022 |
7/15/2024 | 3702 |
Best,
Bryan
Solved! Go to Solution.
Hello @bryanmac_92
With the use of DateTimeFormat([Day],"%a") you will get the day Mon to Sun. Then add today date DateTimeToday().
Now you can filter any date that prior to today. Then with Summarize tool you could find the Max date grouping on days and there you have last Sunday.
Check this post from me and @Yoshiro_Fujimori
Forgot about the Link. 😂
For your convenience, you can use this expression in Filter tool.
DateTimeParse([Date], "%m/%d/%Y") <=
DateTimeAdd(
DateTimeToday(),
- ToNumber( DateTimeFormat( DateTimeToday(), "%w") ),
"day"
)