Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Special variable concatenation.

Hi, everyone. Hope you are doing good. My problem is the following:

I have a variable called 'v_SelectedMonth' (if the selected month is 'Jan', the variable adopts 'January'; if the selected value is 'Feb', the variable adopts 'February'. You get the point).

Now, separately, I have twelve variables: v_DolarCotizationJanuary, v_DolarCotizationFebruary... etc.

And I need to do a division: the divisor is one of those twelve values, depending on the selected month: so, if I select 'Nov', I want 'v_DolarCotizationNovember' to be my divisor, and I want to achieve that value through the concatenation of 'v_DolarCotization' and the content of v_SelectedMonth. I need to do something like this

Amount / if(Moneda='Peso',1,$('v_DolarCotization' & $(v_SelectedMonth)) ) * (-1)

Of course, I am here because that doesn't work.

Does anyone know how can I achieve this?

Thank you very much!

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Maybe:

$(='v_DolarCotization' & v_SelectedMonth)



View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps this: $(='v_DolarCotization' & $(v_SelectedMonth))


talk is cheap, supply exceeds demand
Not applicable
Author

Good one, Gysbert. But sadly, it did not work for me : (

jerem1234
Specialist II
Specialist II

Maybe:

$(='v_DolarCotization' & v_SelectedMonth)



Not applicable
Author

Yeah! You nailed it, jerem1234! Thank you very much!