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.
SOLVED

Using a String as a condition in a filter

sljoseph
7 - Meteor

 

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?

 

19 REPLIES 19
alexnajm
19 - Altair
19 - Altair

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

sljoseph
7 - Meteor

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
7 - Meteor

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.

caltang
17 - Castor
17 - Castor

@sljoseph this is clearer. Like so?

 

image.png

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
sljoseph
7 - Meteor

Thank you @caltang.  I will give this a shot.  If it works out for me, I will mark your response as the accepted solution.

flying008
15 - Aurora

Hi, @sljoseph 

 

FYI.

 

录制_2025_12_29_11_24_20_973.gif

 

flying008_0-1766978950686.png

 

 

klejus
5 - Atom

You can drop the entire text condition into a field, then use a dynamic filter so that Alteryx will read that as the actual rule

sljoseph
7 - Meteor

@klejus - Thank you for your response.  I am fairly new to Alteryx.  Can you provide more detail as to what you are suggesting?  I don't have a Dynamic Filter tool, but I did try to Google it, and this appears to be a macro?

 

@flying008 & @caltang - Thank you but this option does work for me as there are instances where the value may read something like 'Car = 1 and House = 0'

Labels
Top Solution Authors