Skip to main content

Column - chart function

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.



Return data type: dual


  • ColumnNo: Column number of a column in the table containing a measure.
    Information noteThe Column() function disregards dimension columns.


  • Sorting on y-values in charts or sorting by expression columns in tables is not allowed when this chart function is used in any of the chart's expressions. These sort alternatives are therefore automatically disabled. When you use this chart function in a visualization or table, the sorting of the visualization will revert back to the sorted input to this function.

  • If ColumnNo references a column for which there is no measure, a NULL value is returned.

  • Recursive calls will return NULL.

Examples and results:  

Example script results
Example Result

Order Value is added to the table as a measure with the expression: Sum(UnitPrice*UnitSales).

Total Sales Value is added as a measure with the expression: Sum(TOTAL UnitPrice*UnitSales)

% Sales is added as a measure with the expression 100*Column(1)/Column(2)

The result of Column(1) is taken from the column Order Value, because this is the first measure column.

The result of Column(2) is taken from Total Sales Value, because this is the second measure column.

See the results in the column % Sales in the example Percentage total sales.

Make the selection Customer A.

The selection changes the Total Sales Value, and therefore the %Sales. See the example Percentage of sales for selected customer.
Percentage total sales
Customer Product UnitPrice UnitSales Order Value Total Sales Value % Sales
A AA 15 10 150 505 29.70
A AA 16 4 64 505 12.67
A BB 9 9 81 505 16.04
B BB 10 5 50 505 9.90
B CC 20 2 40 505 7.92
B DD 25 - 0 505 0.00
C AA 15 8 120 505 23.76
C CC 19 - 0 505 0.00
Percentage of sales for selected customer
Customer Product UnitPrice UnitSales Order Value Total Sales Value % Sales
A AA 15 10 150 295 50.85
A AA 16 4 64 295 21.69
A BB 9 9 81 295 27.46

Data used in examples:


LOAD * inline [










] (delimiter is '|');


Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: