Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Changing column order

Hi everyone.

I have a straight table with columns from the dimensions tab as well as the expressions tab. There is one column at the end (dimension column) that will not move to a different position when I drag it. I played around by adding other dimensions after it and they too refuse to move.

Please help / advise.

Thank you.

Regards,

Ashley.

14 Replies
rajni_batra
Specialist
Specialist

In presentation Tab there is an option allow Drag and Drop..

Check that column.. hope to help...

Not applicable
Author

Hi.

Thanks for the suggestion. The Drag and Drop option was already checked though...

rajni_batra
Specialist
Specialist

this is weird did u try to create a new table does ot behaves the same?? or post ur sample we will check..

Anonymous
Not applicable
Author

I've also experienced this problem, but recreating is not feasible and the table has complex expressions and labels and is part of a template that I hope to deploy relatively seemlessly.

In the attached file shows the Currency dimension appears to the right of the expressions, and not to the right of the Company dimension as expected. Of the 18 expressions, 12 have show conditons set on the presentation properties.

Some observations:

1. The problem occurs after a save, close and reopen, unlike some presentation level issues

2. The problem occurs in desktop as well as on an Ajax client

3. Asked to save on closing the file, after just doing a failed attempt at moving the dimension. Seems something is done but not being displayed

4. It is possible to move dimensions that are already in the expected position to the left of the expressions

Some remedies:

1. Removing the conditonal show on the Presentation properties, and setting to Show always, did not help

2. Deactivating all the expressions that have a conditional show solved the problem

3. Copying and pasting the table help on one occassion, presumably by recreating the table as suggested by Rajni above

4. Once reordering is possible expressions can be reactivated with it still working

5. Adding another dimension after a reordering is possible again results in the problem reoccuring

Remedies 2 and 3 were not always consistent.

Has anyone any idea what might be happening ? Are dimensions ever meant to appear to the right of the expressions ?

The table is presumably corrupted, but works if all the complexity is removed from it. Perhaps just one or more columns are being corrupted.

Jonathan

Anonymous
Not applicable
Author

Found an issue report about this in the Partner Portal entitiled "Hiding dimension or expression in straight table object may result in column order shifting": https://eu1.salesforce.com/articles/Diagnostic/Hiding-dimension-or-expression-in-straight-table-obje...

Reason is that "The straight table dimensions and expressions are handled separately. This means that when a dimension is hidden the next dimension in line will take the spot, and if an expression is hidden the next expression in line will take the sport.

Suggested fix is to use expressions for the dimensions.

Jonathan

flipside
Partner - Specialist II
Partner - Specialist II

Hi Jonathan,

I looked at this a bit yesterday and the file you supplied did indeed have the final dimension positioned after the expressions.  When promoting the 4th & final dimension to position three it swaps dimensions 3 and 4 as expected but still has the (new) final dimension after the expressions.

After disabling all expressions then re-enabling them (also had to re-enable the conditional show boxes too) the issue was fixed and seemed to remain so even after closing, rebooting pc etc..  However if you then add a new dimension it goes to the wrong position again and the issue is re-introduced.

Maybe the problem is cuased when adding dimensions after conditional expressions already exist.

flipside

flipside
Partner - Specialist II
Partner - Specialist II

Try running this macro against the table - seems to fix it for me and for future dimensions added.  Only thing is I'm not sure how this DisplayOrder setting is supposed to work, might be worth passing on to Qliktech for their opinion.

sub test1

'get the current sort order

d = cp.TableProperties.DisplayOrder

for i = lbound(d) to ubound(d)

msgbox d(i)

next

    set chart = ActiveDocument.getsheetobject("CH1112")

    set cp = chart.GetProperties

    cp.TableProperties.DisplayOrder = 1

    chart.setproperties cp

'get the new sort order

d = cp.TableProperties.DisplayOrder

for i = lbound(d) to ubound(d)

msgbox d(i)

next

end sub

flipside

michael_anthony
Creator II
Creator II

I've just come across the DisplayOrder which believe would be very useful for some macro's I use that attempt to add extra dimensions into charts, and sometimes get this scenario where puts into wrong place.  I did some testing and think I now get the DisplayOrder setting.

It's an array of integers.

The first value indicates how many dimensions to display first (taking from the dimensions in order).

Second value is how many expressions to display after that (taken from the expressions in order).

Third value is how many dimensions to display after that.

And so on.

For example I setup a chart where shifted dimensions and expressions around.  I then got a displayorder of:

4,1,4,1,1,5.

Which matched my columns being:

1st 4 dimensions.

1 expression

Next 4 more dimensions

Next 1 expression

Last 1 dimension

and the final 5 expressions.

I assume setting the value to simply 1 forces Qlikview to show first all the dimensions, then the expressions (in there normal order).  When I applied your macro above to this chart, that's what it did.

dgreenberg
Luminary Alumni
Luminary Alumni

Macro does not run for me.  Could you please double check the syntax?

The top part is the problem:

d = cp.TableProperties.DisplayOrder

for i = lbound(d) to ubound(d)

msgbox d(i)

next