Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Condition Help

HI

if itemcode = 123 than CustomerNumber equal to FieldText else CustomerNumber

how to put it in if condition or any other optimized condition?

pls suggest

1 Solution

Accepted Solutions
sunny_talwar

Is this in the script? then may be this:

If(itemcode = 123, 'SomeText', CustomerNumber) as CustomerNumber

View solution in original post

3 Replies
sunny_talwar

Is this in the script? then may be this:

If(itemcode = 123, 'SomeText', CustomerNumber) as CustomerNumber

abhaysingh
Specialist II
Specialist II
Author

If(itemcode = 123, customer Number ='SomeText', CustomerNumber) as CustomerNumbe


i m luking someting like this, but its not working

jonathandienst
Partner - Champion III
Partner - Champion III

>>If(itemcode = 123, customer Number ='SomeText', CustomerNumber) as CustomerNumber


That does not work because the syntax is invalid*. Sunny has answered your post with the correct solution. Also remember that field names are case sensitive in Qlikview/QlikSense, so CustomerNumber and customernumber are different fields.


*EDIT

Assuming the different forms of CustomerNumber are just typos, the syntax is not invalid, as CustomerNumber ='SomeText' will evaluate to true (-1) or false (0). But it is almost certainly semantically incorrect.

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