Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get Column Number

Hi,

I have a bar chart with 4 expressions and no dimensions. It shows a bar for each one.

My expressions are: Reg1, Reg2, Reg3, Reg 4.

I know that i can reference these values in another expression by the function Column(). Like when i want a total in the chart i can use:

-column(1)+....+column(4)

or

-Reg1+..+.Reg4 (using the names).

How can i get the number of the columns? How can i be sure that Reg1 is column(1)?

Is there a formula that calculates the number of column Reg1 (which is also the first expression)? I am thinking about ColumnNo(Reg1) but it doesn't work.

10 Replies
justaqlikker
Contributor III
Contributor III

Thank you Stefan!  Your formula can get a bit messy, but it really works!  Thank you!  I siplified it a little and it seems to work, just replace 'XY' with your desired column's label formula.

$(= Chr(91) & 'XY' & Chr(93) )