IF(AND( help
- 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 need help translating the following from Excel to Alteryx
=IF(AND([@[Date agreed to recruit target number of patients]]="", [@[Total Number of Patients Recruited At The Agreed Target Date]]<>""),"Yellow","")
Tried a few things, this being the most recent (tried isempty too):
IIF( isnull([Date agreed to recruit target number of patients]) and !isnull([ Total Number of Patients Recruited At The Agreed Target Date]), "0", "False")
Edited to add: the 'true' outcome in my workflow would be highlighting the cell in yellow.
Any help would be appreciated.
Solved! Go to Solution.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@RoisinTM Can you try isEmpty() function
IF isEmpty([Date agreed to recruit target number of patients])
AND isEmpty([Total Number of Patients Recruited At The Agreed Target Date]) Then 'Yellow'
Else ''
EndIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @RoisinTM
Seems to work as expected, isempty would also work. You do have a leading space in 'Total Number of patients...' in your formula so maybe that's the issue?
If you're expecting cells to be highlighted you would need to put a row or column rule in a table tool to do that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Luke_C and binuacs, appreciate the swift responses. No solution yet... but your replies at least tell me I'm not doing anything completely wrong.
I am using the column rules formatting box, and I have tried isempty too - leading spaces are part of the raw data I'm looking at so no issues there.
I'll keep plugging away. Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @RoisinTM
Can you provide some sample data and the workflow you're using? Or screenshots of the tool configuration?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Figured it out - went back through and made sure all my data types were correct and ended up with this, and it worked:
IF IsNull([Date agreed to recruit target number of patients]) and !isnull([ Total Number of Patients Recruited At The Agreed Target Date]) THEN 1 ELSE 0 ENDIF
Again, appreciate the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@RoisinTM the isempty function should also work, I updated the logic
IF isEmpty([Date agreed to recruit target number of patients])
AND !isEmpty([Total Number of Patients Recruited At The Agreed Target Date]) Then 'Yellow'
Else ''
EndIF