Hi how do I convert this Excel formula in Alteryx? Thank you.
=IFERROR(F3-F5,"-")
Solved! Go to Solution.
Hi @BJSOON ,
You can use
if IsNull([F3]-[F5])
then '-'
else [F3]-[F5]
endif
The only problem here is that you will need to leave the data type as string.
Best,
Fernando V.
Thank you! If I change it from "-" to 0, can I leave the data type as V_WString?
=IFERROR(F3-F5,0)
If you change the iferror result, you can use as text or numeric.
if IsNull([F3]-[F5])
then 0
else [F3]-[F5]
endif
best,
Fernando V.
Thank you!
Hi Expert, I'm using this formula.. according to your suggestion but this is showing me error
if IsNull([Last order]-[First order])
then "NA"
else [Last order]-[First order]
endif
Error: Formula: Invalid type of subtraction operator
Could you please tell me the mistake I'm doing...
Hi @AS
In the above scenario "NA" is a string and [Last order]-[First order] could be number which not same datatype. Both output should be same output.
Both columns are from "Date" datatype and it is only giving error in else part..in above near by "IsNull" this formula is working
Hi @AS
You need to use DatetimeDiff() for subtracting between dates.
https://help.alteryx.com/20212/designer/datetime-functions
Hope this helps : )
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |