Cast your vote for the official 2025 Inspire Pin! Designs were submitted by fellow Community members and reflect the creativity and passion of Alteryx users across the globe. Vote now!

Alteryx Designer Desktop Discussions

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

Identify Quarter and Month column

PassION_es
10 - Fireball

Hello Everyone,

 

 

Requesting your assistance to identify the first and last day of a quarter using the date column. 

 

Attached is the dummy input and output for your reference.

 

Date- 02/03/2024

 

OUTPUT Columns:

1. Period From (first day of the quarter) - 01/01/2024

2. Period To (last day of the quarter) - 03/31/2024

3. 1st month of the quarter -  zero 

4. 2nd month  - copy the cwt amount

5. 3rd month - zero

 

6. Total - from 1st to 3rd month column.

 

 

 

3 REPLIES 3
ChrisTX
16 - Nebula
16 - Nebula

check out the DateTime Functions like 

 

DateTimeAdd

 

DateTimeFirstOfMonth


DateTimeLastOfMonth

 

DateTimeTrim(dt,t): Removes unwanted portions of a date-time and returns the modified date-time.

Parameters
dt: Date-time data expressed as a selected column or a specified date-time value between quotes.

t: Trim type. Options include:

firstofmonth: Trim to the beginning of the month (this does the same as month).

lastofmonth: Extend to one second before the end of the last day of the month.

 

Chris

binuacs
21 - Polaris

@PassION_es one way of doing this

image.png

PassION_es
10 - Fireball

thank you both of you @ChrisTX  and @binuacs 

Labels
Top Solution Authors