Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Determining if price is Yearly or Monthly.

Travis_Ratliff
8 - Asteroid

Hello helpful people,

 

Find attached sample data. What I am trying to do is as the subject says determine how long these prices run either M(onthly) or Y(early). For, example the end result would be:

PriceIncrement

54.99

M
59.25Y
63.76M

 

 

Any help or ideas would be greatly appreciated.

1 REPLY 1
Yoshiro_Fujimori
15 - Aurora

Hi @Travis_Ratliff ,

 

On your data, the duration is not unique for each price.

So I made it to decide the "Increment" for each row.

I also assumed that if the duration is 13 month - "Y", 1 month - "M", and all others - blank.

I hope this helps.

 

Workflow

Yoshiro_Fujimori_0-1684868909010.png

 

Formula tool

Start_Date = DateTimeParse([Start Date],"%m/%d/%Y")

End_Date = DateTimeParse([End Date],"%m/%d/%Y")

Duration = DateTimeDiff([End_Date],[Start_Date],"month")

Increment = IF [Duration] = 1 THEN "M" ELSEIF [Duration] = 13 THEN "Y" ELSE "" ENDIF

 

Output

Yoshiro_Fujimori_1-1684868980334.png

 

Labels