Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
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
dgreenberg
Luminary Alumni
Luminary Alumni

Never mind figured it out

set chart = ActiveDocument.getsheetobject("CH1112")

    set cp = chart.GetProperties

need to be at the top of the macro not in the middle.

Not applicable
Author

Hi all

if you use straight table you have flexibility to mix the dimension and expression Oder,

for example if you have the flowing  table with

Region,OrderID as dimensions, 

QTY, Amount,Discount as expression

RegionOrderIDQTYAmountDiscount

you can drag them to be like

RegionQTYAmountOrderIDDiscount

hope it helpful for you,

Regards

reanfadyl
Partner - Creator
Partner - Creator

Bump... just in case someone is feeling lazy. Worked a treat, thanks all.

sub fixtablesort

set chart = ActiveDocument.getsheetobject("CH336")

set cp = chart.GetProperties

'get the current sort order

d = cp.TableProperties.DisplayOrder

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

msgbox d(i)

next

    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

kwarren1
Partner - Contributor III
Partner - Contributor III

Thanks! I just spent 30 min. trying to find a solution to my straight table ordering issues with expressions among dimensions that would not move order until your simple suggestion of dragging and dropping worked like a charm!

jwaligora
Creator II
Creator II

I'm on April 2020 SR4. It's been almost 10 years since this issue got posted, and I'm still running into this problem. As noted in earlier comments, drag/drop doesn't work in my case even after unhiding all the columns.  Being stuck on a such a seemingly simple step is immensely frustrating, not to mention extremely difficult to explain to management.