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: 
Not applicable

Access a calculated column

I want to know if anybody has an idea of how to access column of a calculated column. If it is part of the loaded table, its not an issue. I tried accessing it using various syntax's given online. Can i use the label of the calculated column. Example, if the calculated column label is "total", how to access it. Thank you in advance!!

11 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

you should clarify your question a bit... how do you want to access the column, and where from?

Some thoughts:

- Within the same chart, calculated columns (Expressions) can be referenced in other Expressions by their name (Label) or number, using the function Column(x).

- Outside of the same chart, calculated columns can't be accessed from other charts.

- Calculations that are not "dimensional", can be performed using a variable with a formula that begins with an equal sign.

If these answers don't cover your question, then please clarify your needs in more details.

cheers,

Oleg Troyansky

Learn advanced techniques for QlikView and Qlik Sense in my book QlikView Your Business.

Not applicable
Author

Hi. Thanks for your reply. There is an expression/new column (say Column1) in my chart object like [ if(x>0 and y<0 and z=1, 1,0). So i have a new column with values of 1 or 0 based on condition. Now outside this chart, i need a method to filter data, for example some way i can filter and show only those data for which i have assigned 1 in the chart. This should be done , if a user selects a yes/no in a dropdown for filter Column1 data . If he selects yes, i need to display only those values in column1 that have "1" in them

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

you can't reference the columns outside of the chart. I'd consider placing your calculation in a calculated List Box.

cheers,

Oleg Troyansky

vinieme12
Champion III
Champion III

Nope , you can't on the dashboard .

Create the calculated column in your script.

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Can i reference the value in a calculated column within that table. If so, how ? How do i access the values of the calculated column in each row. Can we access it using the column name(calculated column name)?

Anil_Babu_Samineni

One solution might be

Create one more online with the values of 1,0 and then join them.

Then create mapping for new directory so that use apply map from New to existing table

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
qliksus
Specialist II
Specialist II

Why cant you simply clone the chart and make it as a Straight table with only the column you want to filter . Hide all other columns you don't want to display something like the below and use this calculation in a variable to refer it in other charts

vinieme12
Champion III
Champion III

Yes, there are two ways to do that, these apply to Expressions only

1) Refer column using column number ,: Column(1) 

2) Refer using the Name :

Qlik Tips: Performance using Labels or Column() in charts

Reusing expressions — chart column references | Qlikview Cookbook

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

I placed the calculation in a calculated list box and I am facing an issue in that. I am placing two conditions with an YES/NO. The data is filtered correctly according to my selection. But the selection i make (ie. YES/NO) is disappearing when i click it( it does not stay highlighted). The user will not know if YES/ NO is selected. It is working like a trigger. Once I click yes, data s filtered but the yes does not stay highlighted. Why does this happen?