Qlik Community

QlikView Documents

Documents for QlikView related information.

Colomn Number For Straight Tables.qvw

sgrice
Contributor II

Colomn Number For Straight Tables.qvw

Unfortunately you can not get the expression number in a straight table within qlikview.

This would be useful for those Tables where the expression is the same in each column but is modified by 1.

Examples of this is

Month 1, Month 2,Month 3 etc

This can be painful to create if not using a pivot. [pivots are very limiting]

In a pivot if you want to know the column you are in you can use columnno() but this is not the expression you are on just the dimension that is across the top.

So to know what expression you are in so that you can write one expression and copy it has many times has you need columns and have the expression modify itself to the column it occupies is not possible.

I then wrote a macro to create a copy of the expression and modify it but this leads to an issue that if I later want to change that chart the columns are incorrect.

The final Macro uses a Variable Function [so Works in access point in AJAX]

The Macro can also be rerun after the chart has been modified so the column order is reapplied.

The Macro also Changes Title, Expression and Comment

The example file as

1) the macro [which is only required while designing, so can be deleted before distribution].

2) Simple example table,

3) the variable function [Required so that the macro can be rerun after changes]

Attachments
Version history
Revision #:
1 of 1
Last update:
‎07-24-2015 06:39 AM
Updated by: