Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple question from newbie - using expressions by reference

Hi!

Help me please in my simple question.

I've placed plain table on the sheet. I've added one dimension "Name" and, for example, to expressions "Sum1" and "Sum2":

- sum(A + B + C)

- sum(D + E)

Now i want place one more expression, that will sum two previous. Yes, i can write sum(A + B + C + D + E), but is that possible to use some references to that previous expressions - by name or id?

Like Sum1 + Sum2 or like GetRefValue(1) + GetRefValue(2)

Thanks!

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

In a straight/pivot table or chart you can refer to the results of the other expressions using Column(n), where n is the expression number (starting with 1).

You can also refer to the columns by referencing the column titles, for example:

     [Sales this month]:  your expression for sales this month

     [Sales last month]:  your expression for sales last month

     [% Change]:  ([Sales this month] - [Sales last month]) / [Sales last month]

or

     [% Change]:  (Column(2) - Column(1)) / Column(1)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
MayilVahanan

HI

Try like this

Column(1) + Column(2)

column1:sum(A+B+C) i.e expression1

column2: sum(D+E) i.e.expression2

Its calculate sum(A+B+C) + Sum(D+E) and give the result

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

In a straight/pivot table or chart you can refer to the results of the other expressions using Column(n), where n is the expression number (starting with 1).

You can also refer to the columns by referencing the column titles, for example:

     [Sales this month]:  your expression for sales this month

     [Sales last month]:  your expression for sales last month

     [% Change]:  ([Sales this month] - [Sales last month]) / [Sales last month]

or

     [% Change]:  (Column(2) - Column(1)) / Column(1)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

So simple... Thank you!