Alteryx Designer Desktop Discussions

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

altreyx formula

chiragpatel_1
8 - Asteroid

Hi,

 

I have this following formula form tableau but  I'm trying to apply it to altreyx, as I'm fairly new and due to time constraint, what would the altreyx formula me please?

 

[Report Date (Tableau)] is a field from tableau of course but when I try to replace that with the relevant field ([Report Date2]) in altreyx it is not being picked up, assuming  that is because the other function are not altreyx based.

 

chiragpatel_1_0-1654092797708.png

Thank you in advance

6 REPLIES 6
binuacs
20 - Arcturus

@chiragpatel_1 The datetime functions for alteryx is slightly different compared to tableau. you can refer the below datetime functions in Alteryx change your formula accordingly

 

DateTime Functions | Alteryx Help

chiragpatel_1
8 - Asteroid

Thanks, That is where I Initially looked but It ended up confusing me and complicating things further so decided to post it on here. Bit short on time that's all.

binuacs
20 - Arcturus

@chiragpatel_1 Can you provide the formula in a text format

chiragpatel_1
8 - Asteroid

Here you go and thank you

 

 

(
IF
ISOWEEKDAY(today())=1
date


THEN
(
YEAR(DATEADD('day',-3,today()))=YEAR([Report Date (Tableau)])
AND MONTH(DATEADD('day',-3,today()))=MONTH([Report Date (Tableau)])
)

 


ELSE
(
YEAR(DATEADD('day',-1,today()))=YEAR([Report Date (Tableau)])
AND MONTH(DATEADD('day',-1,today()))=MONTH([Report Date (Tableau)])
)
END
)

chiragpatel_1
8 - Asteroid

any luck?, is it one of those tricky things 

binuacs
20 - Arcturus

@chiragpatel_1 I just converted the appropriate datetime function but the formula will not work because I think it is not in proper alteryx format. For example the below statement is not correct 

 

DateTimeYear(DateTimeAdd(DateTimeToday(),-3,'day')=DateTimeYear([Report Date (Tableau)])

 

 

Can you provide some sample data and expected output result ? 

(
IF
ToNumber(DateTimeFormat(DateTimeToday(),'%w'))=1

THEN
(
DateTimeYear(DateTimeAdd(DateTimeToday(),-3,'day')=DateTimeYear([Report Date (Tableau)])
AND DateTimeMonth(DateTimeAdd(DateTimeToday(),-3,'day'))=DateTimeMonth([Report Date (Tableau)])
)



ELSE
(
DateTimeYear(DateTimeAdd(DateTimeToday(),-1,'day')=DateTimeYear([Report Date (Tableau)])
AND DateTimeMonth(DateTimeAdd(DateTimeToday(),-1,'day')=DateTimeMonth([Report Date (Tableau)])
)
ENDIF
)

  

Labels