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

Order of the columns changed when hide an expression in straight table

Hello,

I have met a problem with the order of the column.

I create a straight table with 4 dimensions and 4 expressions. The order is like : E1 D1 D2 D3 D4 E2 E3 E4 (E represent expression and D represent dimension) .

When i tried to hide the first expression with the option of condition, i thought that after hiding E1  the rest should be like    D1 D2 D3 D4 E2 E3 E4. But unfortunately, i found the order was like : E2 D1 D2 D3 D4  E3 E4.


I don't know why this happens and i have tried a lot of methods, but this problem always remains. E2 will always takes the first position when  I hide E1 .


Any advice?

Rly thanks!!

6 Replies
Colin-Albert

This post has a macro that will fix the issue - see the end of the trail of replies.

Changing column order | Qlik Community

It seems to occur when you have hidden columns and drag & drop columns to change the order.

Anonymous
Not applicable
Author

Hi Colin,

Thanks for your advice, it seems that this macro will always change the order to the original one like D1 D2 D3 D4  E1 E2 E3 E4. But I need some expressions placed in front of dimensions. After drag & drop columns, the problem still exists. So I don't really understand how to use this macro to fix my issue.

Regards

Colin-Albert

Perhaps

1. Run the macro to sort dimensions then expressions in the default order

2. Drag the dimensions to the order you want.

3. Drag the expressions to the order you want.

You may need to repeat this if you add new columns though.

Anonymous
Not applicable
Author

Thanks Colin,

I have tried this method, but when i try to hide one of the expressions, the order still changes, the next expression will take the place of the hidden one. Always gets confused about this problem.

Regards

Colin-Albert

Yes, I have had this problem as well.

The answer seems to be

1. set all columns as visible

2. fix the column sort order with the macro if necessary

3. Arrage the columns in the required order

4, Hide columns

If you need to add further columns, then you may need to repeat this process.

Not an ideal solution I am afraid!

Anonymous
Not applicable
Author

Haha, I will continue to find a better solution. And really thanks for your help, Colin! Maybe it's just a restriction of Qlikview lol.

Regards,

Yinchuan