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.
Thank you in advance
@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
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.
@chiragpatel_1 Can you provide the formula in a text format
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
)
any luck?, is it one of those tricky things
@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
)