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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use PICK() IN QlikView?

for example for 1,2,3,4 -red

5,6,78-green

11,12,14-black

6 Replies
anbu1984
Master III
Master III

=Pick(If(Field<=4,1,If(Field<=8,2,If(Field>=11 And Field <=14,3))),Red(),Green(),Black())

its_anandrjs
Champion III
Champion III

Can you elaborate more about this.

Regards

Anand

Anonymous
Not applicable
Author

Hi,

See this post:

http://community.qlik.com/message/39553#39553

Regards

Neetha

german_avanzato
Creator
Creator

Hi,

Can elaborate a little more your Question?

Pick is used to retrieve the N value from the expression:

Pick ( N, 'A','B','C') will return 'C' with N = 3

N must be a value between 1 and infinity

You can use the help for more information.

Anonymous
Not applicable
Author

Hi,

Use Pick and Match Function:

pick(match(status, 'G', 'A', 'R'), 'Green', 'Amber', 'Red','Grey')


Regards

neetha


its_anandrjs
Champion III
Champion III

Hi,

Please elaborate more or provide data or you can assume this small example

Raw:

LOAD * Inline [

Field

1

2

3

4

5

6

7

8

9

10

11

12

13

14  ];

New:

LOAD

Field,

Pick(if(Field <= 4,1,

       if(Field  > 4 and Field <= 8,2,

       if(Field >= 11 and Field <= 14,3))),Red(),Green(),Black()) as Color

Resident Raw;

DROP Table Raw;

And then in the charts you can use this field Color as the Background color change.

Regards,

Anand