Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
JoaquinLazaro
Partner - Specialist II
Partner - 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
Partner - Specialist III
Partner - Specialist III

Hi Joaquin

Please try change your expression to this:

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

JoaquinLazaro
Partner - Specialist II
Partner - 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)

JoaquinLazaro
Partner - Specialist II
Partner - Specialist II
Author

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

tresesco
MVP
MVP

Define vMonth like:

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

tamilarasu
Champion
Champion

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.

JoaquinLazaro
Partner - Specialist II
Partner - 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