Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

not equal to statement, qlikview

Hi,

where am I going wrong here please?

 

I want to say if field State is not ‘NSW','VIC','QLD','WA','AC','NT','TAS' or 'SA' then make it ‘Other’

 

 

=if(State-={‘NSW','VIC','QLD','WA','AC','NT','TAS','SA'},'Other',State)

Any help appreciated.

LC

 

20 Replies
Anonymous
Not applicable
Author

Thanks but didn’t work

Laura Castagna

Business Systems and Process Analyst, NSW Business Chamber

140 Arthur Street North Sydney NSW 2060

Tel: 02 9458 7804 | Mob: 0429 486 934 | Web: www.nswbusinesschamber.com.au<http://www.nswbusinesschamber.com.au>

Twitter<http://www.twitter.com/nswbc> | Facebook<https://www.facebook.com/NSWBusinessChamber> | LinkedIn<http://www.linkedin.com/company/388425?trk=saber_s000001e_1000> | YouTube<http://www.youtube.com/nswbctv>

<http://www.nswbusinesschamber.com.au/>

Anonymous
Not applicable
Author

Thanks but didn’t work

Laura Castagna

Business Systems and Process Analyst, NSW Business Chamber

140 Arthur Street North Sydney NSW 2060

Tel: 02 9458 7804 | Mob: 0429 486 934 | Web: www.nswbusinesschamber.com.au<http://www.nswbusinesschamber.com.au>

Twitter<http://www.twitter.com/nswbc> | Facebook<https://www.facebook.com/NSWBusinessChamber> | LinkedIn<http://www.linkedin.com/company/388425?trk=saber_s000001e_1000> | YouTube<http://www.youtube.com/nswbctv>

<http://www.nswbusinesschamber.com.au/>

avinashelite

try like this

if(State=‘NSW' or State='VIC' or State='QLD' or State='WA' or State='AC' or State='NT' or State='TAS' or State='SA',State,'Other')

stephenedberkg
Creator III
Creator III

Try this

if(State = {‘NSW'},'NSW',

if(State = {‘VIC'},'VIC',

if(State = {‘QLD'},'QLD',

if(State = {‘WA'},'WA',

if(State = {‘AC'},'AC',

if(State = {‘NT'},'NT',

if(State = {‘TAS'},'TAS,

if(State = {‘SA'},'SA',Other

))))))))

PrashantSangle

Hi,

where you are trying suggested expression.

It must work. did you get any error??

Kind Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

try this one

IF (not Match(State, NSW','VIC','QLD','WA','AC','NT','TAS', 'SA'), State, 'Other')

or

try this one

if(

if(State = 'NSW','other',

if(State = 'VIC','other',

if(State = 'QLD','other',

if(State = 'WA','other',

if(State = 'AC','other',

if(State = 'NT','other',

if(State = 'TAS,'other',

if(State = 'SA','other'

))))))))


jonathandienst
Partner - Champion III
Partner - Champion III

>>Thanks but didn’t work

If you want useful suggestions, you need to provide more feedback about what you tried, what result you got and what result you expected. This is not a guessing game...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
ajsjoshua
Specialist
Specialist

=if(GetFieldSelections(state) = 'NSW','NSW',

if(GetFieldSelections(state) = 'VIC','VIC',

if(GetFieldSelections(state) = 'QLD','QLD',

if(GetFieldSelections(state) = 'VIC','VIC',

if(GetFieldSelections(state) = 'WA','WA',

if(GetFieldSelections(state) = 'AC','AC',

if(GetFieldSelections(state) = 'NT','NT',

if(GetFieldSelections(state) = 'TAS','TAS',

if(GetFieldSelections(state) = 'SA','SA','Other'

)))))))))

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I don't see your State value being used or displayed in the screenshot. Could it be that you're not telling us the whole story?

Almost all answers translate your request into a perfect QlikView expression. They will work flawlessly if used forexample to define a field in your Load Script. But whether they wiill do anything useful at all depends on the context of this expression. For example, in a Text Box on a sheet, it will most certainly produce a NULL value.

Please provide details about where you want to use this expression.

Anonymous
Not applicable
Author

ego ego