Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
saveriospa
Partner - Contributor III
Partner - Contributor III

How can I use concatenated string as parameter in Dollar Sign Expansion ?

Hi to all !

I've two tables with the same set analysis expressions with parameters, in order to perform calculation with different measures.

I made them dynamic defining the set analysis inside a variable.

For example :

v_Var1

sum( {$< ... >} $1 )

But there are also variables with two parameters :

v_Var2

sum( {$< ... >} $1,$2 )

Table 1

Expression 1 : $(v_Var1(ABC_SALES_D))

Expression 2 : $(v_Var2(ABC_SALES_D , XYZ_SALES_X))

Table 2

Expression 1 : $(v_Var1(ABC_QUANTITY_D))

Expression 2 : $(v_Var2(ABC_QUANTITY_D , XYZ_QUANTITY_X))

In the script i create a simple inline table with a single filed Sales_Quantity, that can assume two values : SALES and QUANTITY.

Afterward, i create a variable, v_sales_quantity, that catch the value selected by the user :


SubField(GetFieldSelections([Sales_Quantity]),',',-1)



All with the intention of manipulate the parameter inside the dollar expansion to make everything dynamic based on user selection, with expressions like this :


$(v_Var1($('ABC_'&'$(v_sales_quantity)'&'_D')))

or

$(v_Var1($('ABC_'&$(v_sales_quantity)&'_D')))

or

$(v_Var1($(Text('ABC_'&$(v_sales_quantity)&'_D'))))


But without results.


I'm missing something or this string manipulation is not possible for the parameter?

Many Thanks!!

Saverio

1 Solution

Accepted Solutions
saveriospa
Partner - Contributor III
Partner - Contributor III
Author

I found the solution !

$(v_Var1("$(='ABC_'&$(v_sales_quantity)&'_D')"))

View solution in original post

1 Reply
saveriospa
Partner - Contributor III
Partner - Contributor III
Author

I found the solution !

$(v_Var1("$(='ABC_'&$(v_sales_quantity)&'_D')"))