Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
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

21 REPLIES 21
atcodedog05
22 - Nova
22 - Nova

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
15 - Aurora
15 - Aurora

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.


Bulien
MarqueeCrew
20 - Arcturus
20 - Arcturus

@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 restart. 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
22 - Nova
22 - Nova

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
15 - Aurora
15 - Aurora

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


Bulien
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
22 - Nova
22 - Nova

Hi @ldean 

 

I think the hint is trying to say.

 

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

 

Can you share the workflow.

TheOC
15 - Aurora
15 - Aurora

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


Bulien
Labels