Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Last week

chiragpatel_1
8 - Asteroid

Hi,

 

What would be a simple way to get last week's data (Mon - sunday) regardless of the current day.

 

Been struggling with this. Found other solutions confusing.

 

Many Thanks

2 REPLIES 2
Christina_H
14 - Magnetar

I'm assuming you have a date field in your data?  Use something like this in a filter:

 

ToNumber(DateTimeFormat([Date],"%W"))=ToNumber(DateTimeFormat(DateTimeToday(),"%W"))-1

 

Christina_H_0-1676031018574.png

 

ShankerV
17 - Castor

Hi @chiragpatel_1 

 

One way of doing this.

 

ShankerV_0-1676031699758.png

 

Many thanks

Shanker V

Labels
Top Solution Authors