Alteryx Designer Desktop Discussions

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

Day of the week macro

Madhur12
8 - Asteroid

Hello All! 

 

I've created a macro (attached). This macro gives me the day against my date column if my date is in dd.mm.yyyy format. I want to use it as a generalised macro wherein I can choose to input my date column from the dropdown once connect my dataset. I'm not able to use this macro currently for that purpose. Can anyone help me to identify where is it broken. Thanks!

 

Madhur

10 REPLIES 10
binuacs
20 - Arcturus

@Madhur12 your date field has different formats, you need to convert these formats into the ISO format

 

image.png

Raj
14 - Magnetar

There are multiple data formats into the Field try converting them into a single format then solution can be achieved.

Madhur12
8 - Asteroid

Thanks @Raj @binuacs ! Appreciate your inputs and help!

 

My problem is that if I have a dataset wherein the column header is 'invoice date' or say 'PO date' instead of just "date", this workflow/macro doesn't work. Is there anyway where I can make the macro ask me on which column of my dataset do I want it to run? Thanks!

Raj
14 - Magnetar

@Madhur12 you can add a select tool in macro and rename the column say "date" into the macro and using interface tools you can set up which column is to be renamed using the dropdown tool.
so you will be able to achieve the result.

Madhur12
8 - Asteroid

@Raj - Can you please do what you are suggesting to do as part of the macro ? I'm unable to follow. Attaching the macro here for you to work. Thanks! 

binuacs
20 - Arcturus

@Madhur12 use the dynamic rename to rename the column name to Date, you have to make sure that your original field name contains the word 'Date'. I mean either invoice date or SO date or any thing followed by 'date'

image.png

Madhur12
8 - Asteroid

Thanks @binuacs ! I edited my macro as per your suggestion (attached). I am now trying to run it on a dataset that contains PO date and Invoice Date and it is only picking one output and not asking me on which column do I want to run it on:

 

Screenshot 2024-02-08 101225.png

 

Can you help ? I want it to be able to give me a drop down listing my columns and ask me on which date column do I want to run the macro on. Thanks!

binuacs
20 - Arcturus

@Madhur12 you need an analytical app for that, try the attached one and run it as an analytical app

image.png

Madhur12
8 - Asteroid

Thanks @binuacs ! Do you where can I find more information about the analytics app features of Alteryx ? Thanks! 

Labels