Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
datagrrl
Creator III
Creator 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
Master II
Master II

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
Master II
Master II

May be as below:

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

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

datagrrl
Creator III
Creator III
Author

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

trdandamudi
Master II
Master II

You are welcome and glad able to help.

swuehl
MVP
MVP

Or maybe

If(len(PetType), Green())