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

Alteryx Designer Desktop Discussions

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

If Not Equal To Function

ajaydhamrait
7 - Meteor

Hi everyone, I'm trying to make one of the variables (Currency) highlighted to the colour yellow on the Excel output if it doesn't equal to USD but it comes up as "Parse Error", please could I get some help? 

 

Below are the screenshots. Thanks.

 

ajaydhamrait_0-1650635415335.png

 

ajaydhamrait_1-1650636815781.png

 

 

9 REPLIES 9
Luke_C
17 - Castor
17 - Castor

Hi @ajaydhamrait 

 

You should set-up a column rule in the table tool:

 

Luke_C_0-1650638630582.png

 

Luke_C_1-1650638651348.png

 

JagdeeshN
12 - Quasar
12 - Quasar

@ajaydhamrait  The parse error in the formula tool is because of a mal-informed IF statement.

 

The general syntax is 

 

If <condition> Then <Action>

else <Action>

endif

 

If you correct this the formula should work.

 

For conditional formatting in excel please check out this video.

 

https://cndro.com/how-to-conditionally-format-an-excel-csv-file-in-alteryx/

 

Hope this helps.

 

Best,

Jagdeesh

Sebastiaandb
12 - Quasar

Hi @ajaydhamrait ,

 

Make it a column rule in the table tool :-)

 

Sebastiaandb_0-1650638787157.png

Greetings,

 

Seb

ajaydhamrait
7 - Meteor

That's great, thanks for your help. Another quick question, I want to do the same rule for another 200 currencies, is there a faster way to do this? @Luke_C 

Luke_C
17 - Castor
17 - Castor

Hi @ajaydhamrait 

 

What exactly is the new rule?

Pingu
10 - Fireball

[Currency] in ("USD","EUR","ABC","...") if all same color

ajaydhamrait
7 - Meteor

If the variable Currency, does not equal to USD, EUR, GBP,...., & AUD, then highlight the Excel output cells the colour yellow. Any screenshots or data would be appreciated. Also, I need this to be a column rule.

 

There are roughly 200 currencies I need to do this for.

 

 

Pingu
10 - Fireball

Change the column rule you have for only dollar to

 

[Currency] NOT IN ('USD',EUR','GBP','AUD')

Luke_C
17 - Castor
17 - Castor

I agree with @Pingu. If you need to include 200 currencies though there may be a better way so you don't have to worry about maintaining a giant in clause. Some ideas that come to mind are joining a list of currencies to your data, flagging the fallouts, unioning them back, and using the flag field to drive the highlight. That way you can simply update the list if you have changes in the future. 

 

If you want to go with the NOT IN clause, you can pass your list through a summarize tool to concatenate it for you to put into the formula

Labels
Top Solution Authors