Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

datagrrl
Contributor III

Another Question about Using Pick for Formatting

Hello-

You guys helped me a couple weeks ago. I have been working with Qlikview for a couple years, but the Pick function is one I haven't completely wrapped my head around. I have been told it performs better than an If statement, and it should always be used instead of IF.

I have attached a document. I am using a straight table chart as navigation and wish to format the currently selected value. Pretty basic if statement would get me what I am looking for.

This is a dumbed down version of what I am doing, so you don't have to worry about forcing the user to select one value. I am just looking to replace this If statement in the Background Color.

=if(GetFieldSelections(PetType)=PetType,Green())

1 Solution

Accepted Solutions
trdandamudi
Honored Contributor II

Re: Another Question about Using Pick for Formatting

May be as below:

Replace: =if(GetFieldSelections(PetType)=PetType,Green())

With this : =pick(match(GetFieldSelections(PetType), PetType), Green())

View solution in original post

4 Replies
trdandamudi
Honored Contributor II

Re: Another Question about Using Pick for Formatting

May be as below:

Replace: =if(GetFieldSelections(PetType)=PetType,Green())

With this : =pick(match(GetFieldSelections(PetType), PetType), Green())

View solution in original post

datagrrl
Contributor III

Re: Another Question about Using Pick for Formatting

I thought I tried this. I think I was once again making this harder than it needed to be. Thanks for your help.

trdandamudi
Honored Contributor II

Re: Another Question about Using Pick for Formatting

You are welcome and glad able to help.

MVP
MVP

Re: Another Question about Using Pick for Formatting

Or maybe

If(len(PetType), Green())