ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

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

Parse Error Using Customer Filter

ldean
8 - Asteroid

Dear Alteryx Community,

I am new to Alteryx and am trying to use the custom filter to get alteryx to choose data where the record id equals Customer_id or Customer_Postcode or Store_id or Annual_visits or Avg_Spend_GBP.

 

The parse error is at character 11 which is the first equals sign. The error says "Invalid Type in Operator ==."  I don't understand what I am doing wrong.

 

I would appreciate any help you can give.

 

Lisa

atcodedog05
17 - Castor

Hi @ldean  

 

It might be datatype mismatch issue.

 

I have a question are you trying to compare 2 columns RecordID and CustomerID

or

Are you trying to compare column RecordID has value CustomerID

 

 

If you are trying to compare 2 columns it should be

[RecordID]=[Customer_id]

 

compare whether  [RecordID] is "Customer_id"

Tostring([RecordID])="Customer_id"

 

TheOC
11 - Bolide

hi @ldean 

This is most common when you are trying to compare a numeric field with a string. Given that your trying to compare Record ID with "compare ID" (a string). Then i suspect that your recordID is a numeric field (or not a string field). 

Apply a select before the filter, and make sure that the recordID field is a string type.

MarqueeCrew
19 - Altair
19 - Altair

@ldean ,

 

 I'm explicitly making everything a string.  The fields all need to be either strings or numeric data types. 

tostring([record id]) IN (tostring([Customer_id]),tostring([Customer_Postcode]), tostring( [Store_id]), tostring( [Annual_visits]), tostring([Avg_Spend_GBP]))

 

 cheers,

 

mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Please Subscribe to my youTube channel.
ldean
8 - Asteroid

I have attached a sample of the data. I want it to read the data below the each of the record ids (Customer_id etc).

 

Does this help?

atcodedog05
17 - Castor

Hi @ldean 

 

Can you provide the expected output for this data. We will be able to help you better.

 

Data looks like this

atcodedog05_0-1603816991159.png

 

TheOC
11 - Bolide

hi @ldean 

This seems to work fine with the data you've attached, are you sure [Record_ID] is the correct column you want to be checking against?

TheOC_0-1603817029664.png



Workflow attached

ldean
8 - Asteroid

I just took a course in Alteryx for Beginners. We have been given an assignment to building a workflow etc. Part of the workflow contains this data which is in a spreadsheet with the tab name Customer Data 1.

 

All the directions say is the following: HINT CHOOSE ROWS CONTAINING DATA BASED ON RECORDID IN 2,4,6,8,10.  I thought the only way to do this was to write it [RecordID]= "Customer_id" or etc. 

 

It's all I have.

 

 

atcodedog05
17 - Castor

Hi @ldean 

 

I think the hint is trying to say.

 

[RecordID] in (2,4,6,8,10)

 

Can you share the workflow.

TheOC
11 - Bolide

hi @ldean 

I think the aim of the task is to find a way to specify these rows.

Here is an elegant way, just by checking for rows that contain an underscore:

TheOC_0-1603817618032.png



attached is a workflow

Labels