Concatenating within a conditional statement
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I'm trying to write a conditional statement, but am receiving a malformed statement error that something at the end is wrong.
The logic is; if the field is NOT empty, then that field should equal a $ plus that field.
It is a string field that I'm working with.
as written: IIF(!IsEmpty([Fund_Ending_Value_]) || [Fund_Ending_Value_] = '$' + [Fund_Ending_Value_])
current: 28.00
Desired: $28.00 (but only if that field wasn't empty)
image attached as well.
Solved! Go to Solution.
- Labels:
- Expression
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
IF !IsEmpty([Fund_Ending_Value_]) THEN '$' + [Fund_Ending_Value_]
ELSE [Fund_Ending_Value_]
ENDIF
check out examples on the Functions page: https://help.alteryx.com/current/en/designer/functions.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I swear that was the way I tried it first,but was getting a different error!
Obviously I missed a detail then as well.
Thank you,
Kim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@kas I'm a bit late to the party but if you wanna keep the IIF syntax you can do this:
IIF(!IsEmpty([Fund_Ending_Value_]), '$' + [Fund_Ending_Value_], NULL())
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you! :)

