How to retrieve the filename of my input data in an expression? My task is to create an expression in Alteryx using formula tool where if the filename consists the word Q1, it will create a posting date "31/3" and the year will be the year of the file, and 30/6 for Q2 and so on until Q4. My expression is
IF Contains([FileName], "Q1") THEN
Date(DateTimeParse([FileName], "%Y"), 3, 31)
ELSEIF Contains([FileName], "Q2") THEN
Date(DateTimeParse([FileName], "%Y"), 6, 30)
ELSEIF Contains([FileName], "Q3") THEN
Date(DateTimeParse([FileName], "%Y"), 9, 30)
ELSEIF Contains([FileName], "Q4") THEN
Date(DateTimeParse([FileName], "%Y"), 12, 31)
ELSE
Null()
ENDIF
which apparently is not working as FileName is an unknown variable