Alteryx Designer Desktop Discussions

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

Need to put Day/MM/YY into MM/YYYY format to create pivot data

Karl_Spratt
8 - Asteroid

Hi Community,

Need some help please 

I want to add a column to convert this date field to show the MMM-YYYY so I can create a pivot, for the last 12 months data, if needs to be dynamic so Feb-21, Mar-21, Apr-21 up tp Jan-22 would be this months look back, then as we move forward, 12 months back in March would be the March 21 to Feb -22 data etc. My Data is in this format so for the 26/04/2021, I'd like to see in the new column 04/2021 or 2021/04 which every the pivot would sort numerical on 

 

Can anyone explain this to me please.

TIA,

Karl. 

data richiesta
26/04/2021
04/03/2021
26/04/2021
04/06/2021
01/04/2021
13/05/2021
13/05/2021
04/06/2021
07/01/2022
03/12/2021
04/05/2021
29/11/2021
16/09/2021
20/05/2021
29/11/2021
30/09/2021

 

Karl_Spratt_0-1644320099539.png

 

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @Karl_Spratt 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1644320619523.png

 

Hope this helps : )

 

Karl_Spratt
8 - Asteroid

Hi atcodedog05

Another Question,

My Pivot later in the workflow is now in alphabetic sort, not in MMM-YY sort, I guess this is because the new colnm I ass to create the month is a vstring, but this doesn't then allow for sorting by MM-YY as the A's are first in the list etc

Can you please advise, sorry to annoy you. 

TIA 

Karl. 

 

Karl_Spratt_0-1644321434534.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @Karl_Spratt 

 

Create 2 columns 1 with date format which can be used for sorting and another for displaying like below.

 

atcodedog05_0-1644322279827.png

 

Hope this helps : )

 

 

Karl_Spratt
8 - Asteroid

thanks atcodedog05  that worked for me..

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @Karl_Spratt 

Cheers and have a nice day!

Labels