Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using Match function with variables

Hi,

how to use match with variables?

in attach a small example with a variable, where if i copy text value it work's but if i intend to use the variable don´t.

cam you help me ?

thanks

Ricardo

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

That is because your variable contains unquote shortened month names. The $-sign expansion will result in an invalid parameter list.

You could change this into somthing like

=Match('Jan', $(=chr(39) & replace(MonthNames, ';', chr(39) & ',' & chr(39)) & chr(39)))

but that looks overly complex to me...

[Edit] Corrected expression to use MonthNames variable. Works better

View solution in original post

5 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

That is because your variable contains unquote shortened month names. The $-sign expansion will result in an invalid parameter list.

You could change this into somthing like

=Match('Jan', $(=chr(39) & replace(MonthNames, ';', chr(39) & ',' & chr(39)) & chr(39)))

but that looks overly complex to me...

[Edit] Corrected expression to use MonthNames variable. Works better

Anonymous
Not applicable
Author

Peter,

did not work.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes, because your vMonthNames variable already did contain a complex expression. Try again with the amended example...

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Ah, this also works well:

=Match('Jan', $(=$(vMonthNames)))

Anonymous
Not applicable
Author

Peter,

works fine.

And now I understand your answer.

thanks