Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use Value of Expression for another Expression

Hello,

I have created a column with pretty lengthy definition.  I would somehow like to grab the result of that column to use in another column.  Is there a way to do this beside making the expression a variable??

Thank You For Help

5 Replies
its_anandrjs

Hi,

If have any sample file then provide please, if possible provide any sample file.

Regards

Anand

datanibbler
Champion
Champion

Hi,

what type is the chart which you want to use that expression in?

=> Generally, it is possible to define one expression, give it any specific name and, in the next expression (but only within the same chart/ object), to refer to the result of that expression just by naming it.

Also, you don't have to display all expressions that you have defined. In a table_diagram for instance you can just switch a radiobutton on the "presentation" tab.

HTH

Best regards,

DataNibbler

Anonymous
Not applicable
Author

Yes...you can reference the value of the column simply by referencing the label. No need to use the same expression twice.

Example:

Label: Field1

<some complex expression>

Label: Field2

=Field1 / 2 // This will give you the value of Field1 divided by two

maxgro
MVP
MVP

also with

Column(n)

to reference column n of your chart

Anonymous
Not applicable
Author

Are those columns in the same chart/object? Because if they are, you can use an expression in a different expression by referencing the expression's label.
For example: Assuming I have 2 different expressions, represented as two columns, labeled as: Sum and Average, and I want to multiply the two columns in a different expression, as a different column. In that case my new column's expression would be something like: ([Sum] + [Average]).
In conclusion, if you want to use an expression in a different expression, in the same chart, you can reference them by their labels, using [<label name>]. Generally QlikView will suggest you the expression name if you want to use this mechanism

Best regards,
Mihai Iov