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: 
sculptorlv
Creator III
Creator III

Local variables

I have quiet a big report and many tables within it.

In each table I use similar formulas .. like this:

IF (

SUM(if((Sale_Category = 1.1 OR Sale_Category = 1.2), Sale_Money, 0))

/

SUM(if((Budget_Category = 1.1 OR Budget_Category = 1.2), Budget_Money, 0))

< Water_C2,

Is it possible to define formula  s ONE local variable ... like CHECK =.... ???

SUM(if((Sale_Category = 1.1 OR Sale_Category = 1.2), Sale_Money, 0))

/

SUM(if((Budget_Category = 1.1 OR Budget_Category = 1.2), Budget_Money, 0))

a

I can't do it in Settings-Variables (global), because it will not take local filters into account during the calculation.

6 Replies
Anonymous
Not applicable

You can use customized Measure as a local variable,

like this:

Adding Multiple measures in qliksense

sculptorlv
Creator III
Creator III
Author

Sorry, didn't get it.

I use expressions in simple Table charts. I don't have any X or Y axis.

I just need to replace big formula ... to be like this

IF ( CHECK< Water_C2), ...

jonathandienst
Partner - Champion III
Partner - Champion III

Simply add the variable CHECK in the variable overview to be:

CHECK:

SUM(if((Sale_Category = 1.1 OR Sale_Category = 1.2), Sale_Money, 0))

/

SUM(if((Budget_Category = 1.1 OR Budget_Category = 1.2), Budget_Money, 0))


Then in your expression:


     If(($(Check)) < Water_C2),...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sculptorlv
Creator III
Creator III
Author

I can't do this. In this case, it will be GLOBAL variable and it will not take into account local filters in my Chart Tables.

sculptorlv
Creator III
Creator III
Author

Can you please provide easy answer, how to use the variable in Charts expressions, which was defined in Qlick sense?

I defined my variable Let VarialbeX = Today()  ... where I have to define within qlick sense.

But, the system doesn't recognize VariableX within Charts expression.