I had the following formula built:
If [Material] = 4528638001 then 7.00
Elseif [Material] = 4980263001 then 8.75
Elseif [Material] = 5509661001 then 22.5
Elseif [Material] = 6908349001 then 53.81
Elseif [Material] = 8256292001 then 20.00
Elseif [Material] = 7748906001 then 7.00
Else "Error"
Endif
....but needed to add a condition to one of the line items based off a date.
If [Material] = 4528638001 then 7.00
Elseif [Material] = 4980263001 then 8.75
Elseif [Material] = 5509661001 and [Order Date] < 2/1/2020 then 22.5
Elseif [Material] = 5509661001 and [Order Date] >= 2/1/2020 then 6.50
Elseif [Material] = 6908349001 then 53.81
Elseif [Material] = 8256292001 then 20.00
Elseif [Material] = 7748906001 then 7.00
Else "Error"
Endif
Once I added this condition, no data is coming back for this Material. Any solutions for why Alteryx isn't able to read my conditional AND statement? Fixes/work-arounds?
Solved! Go to Solution.
Hi @ervelasco,
your date needs to be wrapped in quotes and the right format.
Try this:
If [Material] = 4528638001 then 7.00
Elseif [Material] = 4980263001 then 8.75
Elseif [Material] = 5509661001 and [Order Date] < "2020-01-02" then 22.5
Elseif [Material] = 5509661001 and [Order Date] >= "2020-01-02" then 6.50
Elseif [Material] = 6908349001 then 53.81
Elseif [Material] = 8256292001 then 20.00
Elseif [Material] = 7748906001 then 7.00
Else "Error"
Endif
Let me know if it works.
Best
Alex
Please make sure that your dates are in the format of: YYYY-MM-DD.
If [Material] = 4528638001 then 7.00
Elseif [Material] = 4980263001 then 8.75
Elseif [Material] = 5509661001 and [Order Date] < "2020/02/01" then 22.5
Elseif [Material] = 5509661001 and [Order Date] >= "2020-02-01" then 6.50
Elseif [Material] = 6908349001 then 53.81
Elseif [Material] = 8256292001 then 20.00
Elseif [Material] = 7748906001 then 7.00
Else "Error"
Endif
Thanks Alex - once I reformatted the date it is working!