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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to refer to an expression in another expression

Hi All,


I apologise if this is a very simple question, but I cannot find what I'm looking for, partially because I'm not sure what to search for...


In a straight table I have several expressions where their definitions are fairy complex (well for me anyway), I want to be able to refer to these expressions within other expressions, for example:

Expression 1 = profit year 2010
Expression 2 = profit year 2011
Expression 3 = profit difference between 2010 and 2011 expressed as a percentage

Although I can generate expression 3, it is based on expressions 1 and 2, which are already quite long in themselves.  What I would really like to be able to do is refer to the expressions via an alias or something similar.  This would make expression 3's definition easier to read, and if I have to change expression 1 or 2, this would be automatically reflected in expression 3.

I hope this makes sense, and if possible, will save me a great deal of time and banging my head against a brick wall.

Thanks in advance.

Trevor

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

You can also use

=Column(ExpressionNumber)

Just type the expression 3 as Column(1) - Column(2)

in your expression.

Regards,

Jagan.

View solution in original post

4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can refer to already defined expression in chart by their label.

     Just type the expression 3 as [profit year 2010] - [profit year 2011]

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jagan
Partner - Champion III
Partner - Champion III

Hi,

You can also use

=Column(ExpressionNumber)

Just type the expression 3 as Column(1) - Column(2)

in your expression.

Regards,

Jagan.

Not applicable
Author

I had wondered about this, but the column caption is based on a variable which is populed by a user selection, so wasn't sure if this would work?  Plus would still be a little bit more complidated to read - well for me anyway!

Thanks for the quick response!

Not applicable
Author

This works like a charm and makes life so much easier for me - this is going to save me a lot of effort!

Thanks

Trevor