Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
We’re experiencing technical issues with our vendor that are affecting license activations for Designer Desktop. We don’t yet have an estimated resolution time. We apologize for the inconvenience and will share updates as we have them.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Datetime quarter

schenkelpat
7 - Meteor

I am trying to build a filter that pulls the Quarter to date sales.  In SQL, I would have done something like:

 

Date between Datetrunc('quarter', today()) - interval '1 quarter' and datetrunc('quarter',today())

 

In Alteryx, I've been able to do DateTimeTrim(DateTimeNow(),'month'); but, i can figure out the date time unit to get to quarter?  Is there another way?


Thanks,
Pat

2 REPLIES 2
JordyMicheal
11 - Bolide

Give this a try:

 

DateTimeFormat([Date],'%Y Q') + ToString(Ceil(ToNumber(DateTimeFormat([Date],'%m'))/3))

schenkelpat
7 - Meteor

Disregard-figured it out...

 

CEIL(DateTimeMonth([Calendar Date]) / 3) >= CEIL(DateTimeMonth(DateTimeAdd(DateTimeNow(),-1,"month"))/3)

Labels
Top Solution Authors