Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
patricesalem
Creator II
Creator II

Wild Card in set Expression with variable

Hello

I'm trying to combine the use of wild cards and variable in set expression for producing a chart & table (qlik sense sheet)

Here is what works  (use of " front of PROMOUP):

sum({<Year={'$(=$(vCurrentYear))'},[Hierarchie-hierarchie]-={'PIECE'},[cde_achat]={"*PROMOUP*"}>}qte_commandee)

If I replace PROMOUP by a variable (vPromo), the following works :

sum({<Year={'$(=$(vCurrentYear))'},[Hierarchie-hierarchie]-={'PIECE'},[cde_achat]={$(vPromo)}>}qte_commandee)

I don't manage to get it to work with vPromo and *

Any idea about the correct syntax ?

thanks

1 Solution

Accepted Solutions
patricesalem
Creator II
Creator II
Author

Bingo !

sum({<[cde_achat]= {"*$(=(vPromo))*"}>}net_commande),

only remove the $ front of the variable parenthesis

thanks for your support

View solution in original post

4 Replies
sunny_talwar

How is vPromo defined?

patricesalem
Creator II
Creator II
Author

in the variable module

for test purpose, I have set it up as follow:

Image 1855.jpg

then the user will be able to change it using qsvariable :

Image 1856.jpg

patricesalem
Creator II
Creator II
Author

I have just noticed that the following expression works

sum({<[cde_achat]={"*$(=$(vPromo))*"}>}net_commande)

only if the inputbox field is between quotes '  '

Image 1857.jpg

but I don't want the user to write ' '

patricesalem
Creator II
Creator II
Author

Bingo !

sum({<[cde_achat]= {"*$(=(vPromo))*"}>}net_commande),

only remove the $ front of the variable parenthesis

thanks for your support