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: 
pascos88
Creator II
Creator II

Use a values of a column already calculated

Hi all,

there is a way to use in a formula a value already calculate in another column ?

A               B               C

60            50               10

where C is A-B..

Since both in Column A e B there are big expression behind, and it will be really massive to calculate again for the column C,

there is some way to say in the expression for Column C -->  Column(A) - Column (B)

thanks for any helps

13 Replies
Chanty4u
MVP
MVP

store  A and B values in variable    do below

(vValue) - (vSale)

OmarBenSalem

Sure thing,

If you have a table; with 3 columns,

C (column 3 ) could have as an èxpression:

column(1)-column(2)

Try it

pascos88
Creator II
Creator II
Author

Doesn' t work like this...

OmarBenSalem

Can u maybe share a screenshot of what u have? and what result you got using this?

Because it works for me:

Capture.PNG

agigliotti
Partner - Champion
Partner - Champion

let's try using the below expression for column 3:

( column(1) ) - ( column(2) )

pascos88
Creator II
Creator II
Author

this is my test, and doesn't work..Column1-2.PNG

simon_minifie
Partner - Creator III
Partner - Creator III

Hi Pasquale,

It doesn't look like you're closing your parentheses correctly.

Try:

(column(1)) - (column(2))

Thanks,

Simon

pascos88
Creator II
Creator II
Author

Hi Simon,

unfortunately the issues is not this one.. I tried and nothing happens.

Are we sure that should work for both QS and QV?

I am using QS

Best

simon_minifie
Partner - Creator III
Partner - Creator III

Hi Pasquale,

Have just had a play around with it, and as per the Qlik documentation, it doesn't work on dimension values, just measures.. Could that be the issue?

"Column() returns the value found in the column corresponding to ColumnNo in a straight table, disregarding dimensions. For example Column(2) returns the value of the second measure column."

https://help.qlik.com/en-US/sense/3.1/Subsystems/Hub/Content/ChartFunctions/InterRecordFunctions/col...

Thanks,

Simon