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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
kevbrown
Creator II
Creator II

Scripting between

How can I add an extra column in my data to say if the score is high or low. So i have a column called Gates and i need to produce a new column called Score in which i need to put high or low depending on the score. So anything >10 but <999 needs to say Low and anything >999 needs to say High.

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be like this:

LOAD Gates,

          If(Gates > 10 and Gates <= 999, 'Low',

          If(Gates > 999, 'High', 'N/A')) as Score

FROM Source;

View solution in original post

4 Replies
sunny_talwar
MVP
MVP

May be like this:

LOAD Gates,

          If(Gates > 10 and Gates <= 999, 'Low',

          If(Gates > 999, 'High', 'N/A')) as Score

FROM Source;

Saravanan_Desingh
MVP
MVP

One more version..

Load *, Pick(Match(-1,(Gates > 10 And Gates <= 999),Gates > 999,Gates<=10),'Low','High','N/A') As Score;

Load * Inline [

Gates

11

1000

9

];

sunny_talwar
MVP
MVP

Nice, looks good. Thanks for sharing this saran7de

Saravanan_Desingh
MVP
MVP

I'm proud. A word from Vashishtha