Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
joaquinlr
Specialist II
Specialist II

Help with Pick() function

Hello:

I have this expression in a chart: Pick(Month(Today()), 'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic' )

I would like something like this

vMonth = 'Ene, Feb, Mar, Abr, May, Jun, Jul, Ago, Sep, Oct, Nov, Dic'

Pick(Month(Today()), vMonth)

But I can't get it. Is it possible ?

Thank you very much

Joaquín

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Define vMonth like:

'Ene', 'Feb', 'Mar',.......              // No '=' sign and with closing quotes

View solution in original post

7 Replies
miguelbraga
Specialist III
Specialist III

Hi Joaquin

Please try change your expression to this:

Pick(Month(Today()), $(vMonth) )

joaquinlr
Specialist II
Specialist II
Author

Hi Miguel:

I've just tried it, but it doesn't work

= Pick(Month(Today()), $(vMonth) )  it should be 'Oct' but the result in NULL !!!!


Thank you

Joaquín

SreeniJD
Specialist
Specialist

If you want to fetch the value from your variable, you have to use "$"

As suggested by MiguelBraga‌  have $(vMonth)

joaquinlr
Specialist II
Specialist II
Author

Sure, but it doesn't work !!!!

tresesco
MVP
MVP

Define vMonth like:

'Ene', 'Feb', 'Mar',.......              // No '=' sign and with closing quotes

View solution in original post

tamilarasu

Hi Joaquin,

Change the variable vMonth Format like below,

'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'

Expression as Pick(Month(Today()), $(vMonth) )

It should work. Let me know.

joaquinlr
Specialist II
Specialist II
Author

Thank you guys. Now it works

Before write here I tried with vMonth and $(vMonth) ... but I didn't populate vMonth as tresesco and TamilArasu wrote because the expression editor mark it as error (red underline) !!!!

Good job, thanks you all

Joaquín