Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
UncleRiotous
Creator
Creator

Referencing Columns In Tables

Does anyone know if there's any documentation for referencing a column in a table on a sheet using it's name. I know the basics (you put the column label in [square brackets]) but I can't find any reference to it in the help documentation.

Labels (2)
5 Replies
marcus_sommer

It's somewhere. Didn't look yet because the following should include all information:

QlikView Quoteology - Qlik Community - 1476029

UncleRiotous
Creator
Creator
Author

Marcus, thanks but that doesn't really answer my question.

I understand when to use brackets and quotes and I'm fine pulling back fields from data tables. What I'm trying to find is documentation about how to reference a column in a table object on a sheet using it's label.

So if I put a table object on a sheet with a Measure of Count(Order_Num) and a Label of Number of Orders then in a different column in the table I can use [Number of Orders] to pull in that calculated value for that row.

I've used the functionality but I don't know what its limitations are and can't find any documentation that gives details.

Or
MVP
MVP

This works (at least, usually), but I would advise against using it. Instead, use master items and reference those master items. Since your label may well end up being the same as a master item or a field, using it as a reference is not an ideal approach. If you absolutely need to refer to a column directly, the safest way is to use e.g. Column(1). I'm unsure if using the label directly is a legacy thing from QV or if it's something that's meant to be used - I don't remember seeing much in the way of documentation about it.

N30fyte
Creator
Creator

FWIW I wouldn't rely on it. Columns created in this way display errors in the Expression Editor, even if they do appear to calculate correctly, which immediately sounds alarm bells. The functionality behind it may get fixed, or it may get removed in a future update.

And apart from anything else, the calculation in the second column will fail if the base column is relabelled.

I think it worked in QlikView, but I believe that Master Measures are the way to go in Qlik Sense.

ADD: you could instead use Column(), which has the advantage of being fully documented. But again it relies on no-one coming along and adding extra columns between the base column and the second column.

marcus_sommer

AFAIK there is not much documentation in regard to reference to another expression as the listed possibility of using column(index) or [Label of Exp]. Quite probably because that there is sometime a special need to apply such logic but not to use it as a general approach. The occasions for a usage are rather seldom because it means to create some kind of redundancy and has some risks in regard to move the column or to rename the label and/or to hide them (conditionally) and/or by conflicting by usage them within another expressions (nested aggregations) and/or within total-calculations.

Personally I use such expression-references quite rarely - mostly by small and not important cases within a quick & dirty approach or if the object has some kind of dynamic changing logic.