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: 
oxiofrt
Partner - Creator
Partner - Creator

Can you give explanation about variables and syntax (equal sign, quotes…) ?

Variables are really useful.

First I used them to store formulas that have to be used several times.

It seems that they can be used for other reasons : (please feel free to correct me if I misunderstood !)

- If I DON'T put a equal sign in the variable formula, it can be used for my first aim

- If I DO put a equal sign in the variable formula, it can be used to do dynamic calculation that evaluate to only one value (if this variables in a table with one dimension, the variable provide the same value in all the lines)

What I don't understand is « when shoud i use quotes in the expressions that are using variables ?"

For example :

Why an expression like that works :

=$(Cout moyen par sortie) - '$(V_mediane)'

Where as the following do NOT works :

='$(Cout moyen par sortie)' - $(V_mediane)

=$(Cout moyen par sortie) - $(V_mediane)

KNOWING THAT :

$(Cout moyen par sortie) is defined by this formula -> Sum (MT_MASSE_SAL) / Sum (NB_SORTIES_MC)

$(V_mediane) is defined by this formula -> =median(

aggr(

(sum(MT_VACS_MC) + sum(MT_MASSE_SAL))

/

sum(NB_SORTIES_MC), LIB_CENTRE

)

)

Can you help ?

Thanks a lot for your help !

1 Reply
Not applicable

Bumping this because I've always wanted to ask this myself - I've never understood this I just do it.