ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Using a String as a condition in a filter

sljoseph
6 - Meteoroid

 

Hello - I have a variable where the value of the variable may be Car = 1.  I need to use this value as a condition in a filter. This variable is created by a drop-down field in a excel spreadsheet.

 

The data looks something like this.  The variable can be 'Car = 1' OR 'House = 0' OR 'Cell Phone = 1', etc.

 

Customer NameCarHouseCell Phone
Peter Parker110
Tony Stark101
Natalia Romanova011

 

Simply using the variable in a filter does not seem to work.  Can anyone help with this?

 

4 REPLIES 4
alexnajm
19 - Altair
19 - Altair

If you want to filter on a string value, use single or double quotes. For example, [Car]=“1”

sljoseph
6 - Meteoroid

Thank you for responding.  The value of the condition is not a string.  The whole condition is a string.  The string would be CAR = 1.  CAR = 1 is the string.  I need to use this entire string as a condition in a filter.

alexnajm
19 - Altair
19 - Altair

The data presented above should work the way I have it laid out - if it’s not working can you provide a sample input and your expected output?

 

if it is like you say it is, then what you presented earlier should work!

sljoseph
6 - Meteoroid

Forgive me if I am misunderstanding.  The data comes in as a field from an excel spreadsheet.  The spreadsheet looks like this:

 

Rec TypeAdvisoryStart DateEnd Date
UPH[Car] = 111/2/202511/15/2025

 

The Advisory field holds the condition that I am trying to use.  When I put the field [Advisory] in the filter, it does not filter.  The data that the [Advisory] field is being used against is as shown below.  

 

What I have 

Customer NameCarHouseCell Phone
Peter Parker110
Tony Stark101
Natalia Romanova011

 

 

What I want

Customer NameCarHouseCell Phone
Peter Parker110
Tony Stark101

 

It is possible that the value of the [Advisory] field could be 'Car = 1 and House = 0' OR 'Car = 0 and Cell Phone = 0 and House = 1', etc.

Labels
Top Solution Authors