Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

'Tis the season to be spooky! Read our new blog, How Spooky is Your City? Mapping and Predicting Scary Stuff. In it, @SusanCS provides a fun glimpse into using data to figure out the creepy quotient of where you live!

SOLVED

if statement

Highlighted
8 - Asteroid

Hi Family, 

 

Why wouldn't this work?

 

if [SEC Question] = "" or

if [SEC Question] = "None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer."

then "Non-SEC"

else "SEC"

endif

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
There's an extra If in your statement

if [SEC Question] = "" or

[SEC Question] = "None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer."

then "Non-SEC"

else "SEC"

endif

Cheers,
10 - Fireball

Hi @AuditPro13 

 

remove the second stated "if" and it should be okay.

to be :-

---------------

if [SEC Question] = "" or

[SEC Question] = "None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer."

then "Non-SEC"

else "SEC"

endif

---------------

Regards,

Aidan

Highlighted
8 - Asteroid

Thank you bruv!

 

For some reason its still not working though. Its returning all SEC when there are blanks (or [NULL]) and "None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer."

 

Any clue what it could be?

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
Try

if IsEmpty(Trim([SEC Question])) or

[SEC Question] = "None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer."

then "Non-SEC"

else "SEC"

endif
Highlighted
8 - Asteroid

Getting closer!

 

The blanks are now showing Non-SEC but None, the entity is neither an SEC registrant /FPI nor a Canadian Reporting Issuer. is still showing SEC.

 

Any ideas?

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
The string is too long and probably there's a character mismatch.

I'd advise you to use keywords on this string and the function Contains instead of matching the full string.

Contains(SEC Question, "None"), for example
Highlighted
8 - Asteroid

Thank you again! Hope you have a wonderful weekend Thableaus.

Labels