Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Grouping

Hi All

Have a field name "Runs" and the values under it are like this

0.01

0.2

.06

.7

.09

1

2

3

4

4.0

5

6

In the script i want to derive one more column from this where the condition is

if(Runs>=0.01 and <=0.9 'Low'

  if(Runs=>0.9 and <= 2 'middle'

   if(Runs=>2 'High') as Consolidate

How do i achieve this in the script level

Can someone help me please

1 Solution

Accepted Solutions
sunny_talwar

Something like this:

Table:

LOAD Runs,

  If(Runs>=0.01 and Runs <=0.9, 'Low', If(Runs >= 0.9 and Runs <= 2, 'Middle', 'High')) as Consolidate;

LOAD * Inline [

Runs

0.01

0.2

.06

.7

.09

1

2

3

4

4.0

5

6

];


Capture.PNG

View solution in original post

3 Replies
sunny_talwar

Something like this:

Table:

LOAD Runs,

  If(Runs>=0.01 and Runs <=0.9, 'Low', If(Runs >= 0.9 and Runs <= 2, 'Middle', 'High')) as Consolidate;

LOAD * Inline [

Runs

0.01

0.2

.06

.7

.09

1

2

3

4

4.0

5

6

];


Capture.PNG

its_anandrjs

Try this ways

if(Runs >= 0.01 and Runs <= 0.9 ,'Low',

if(Runs => 0.9   and Runs <= 2 , 'middle',

if(Runs => 2,  'High' ) as Consolidate

Regards,

Anand

Chanty4u
MVP
MVP

chk below