Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vanir88
Creator
Creator

how to use if condition in script

 

if [results] is "jan" then type "redirected to jan" in column [country]

Labels (1)
1 Solution

Accepted Solutions
G3S
Creator III
Creator III

Try:

if ([Results] = 'End SSD', 'redirected to SSD',[Type or select country]) as [Type or select country]

View solution in original post

7 Replies
G3S
Creator III
Creator III

are you wanting to create a new field called 'country'? or is it already an existing one?

vanir88
Creator
Creator
Author

Results , country are both existing columns.

in results we have jan end , so if it is jan end then in country column "redirected to end jan" like this  value should come

G3S
Creator III
Creator III

does country column have values in it? 

if so in what scenario would you want the that value to be shown instead of 'redirected to ..'

vanir88
Creator
Creator
Author

if ([Results] = "End SSD" then [Type or select country] should be "redirected to SSD")

 

[Results] and  [Type or select country] are existing columns

in results column we have data like ...  End SSD, End PRD, Blanks 

so if the field is End SSD  then  [Type or select country]  column data should come like "Redirected to End SSD"

vanir88
Creator
Creator
Author

in country column blank will be there  wont be any data

G3S
Creator III
Creator III

Try:

if ([Results] = 'End SSD', 'redirected to SSD',[Type or select country]) as [Type or select country]

vanir88
Creator
Creator
Author

ok, thank you i will try this.