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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

String replacement with variable

Hi,

How is it possible that I have some results with :

Sum({<NOM_PERIODE={'20160412-0025-24 chauffe'}>}VALEUR_METRIQUE))

but when I put the string '20160412-0025-24 chauffe' in a variable SELECTION I don't have any result with :

Sum({<NOM_PERIODE={$(SELECTION)}>}VALEUR_METRIQUE))

Am I missing something ?

4 Replies
sunny_talwar

May be try this:

Sum({<NOM_PERIODE={$(=SELECTION)}>} VALEUR_METRIQUE)

sunny_talwar

Are you specifying 20160412-0025-24 chauffe (Without single quotes) or '20160412-0025-24 chauffe' (with single quotes) as your variable definition?

If it is without, may be you need this:

Sum({<NOM_PERIODE={$(=Chr(39) & SELECTION & Chr(39))}>} VALEUR_METRIQUE)

swuehl
MVP
MVP

Or

Sum({<NOM_PERIODE={'$(SELECTION)'}>} VALEUR_METRIQUE)

Not applicable
Author

It worked with

Sum({<PERIODE_NOM={'$(=vREFERENCE_NOM)'}>}METRIQUE_VALEUR)