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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hiding columns on a standard or pivot table chart

Hi,

I want to hide certain columns in a table when I click a particular column header. Can this be achieved in qlikview?

e.g If I have following columns A, B, C, C1, C2, C3, D, E

When I click column C column C1, C2 and C3 should get hidden and now if I again click C they should show--basically toggle on click of column C.

Thanks in advance for any help

Ritesh

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Ritesh,

Without going into the "how" part - it can be done by macros. You can place a transparent over the column C. Click on the button will run the macro to hide/show colums.
To hide a column in pivot table - if it is a dimension, the only way I ever used is to set its width to 0. To hide expression column is probably better by disabling the expression.

Maybe the best way is to create two tables - one with columns C1, C2, C3, and another without. Button will simply hide one table and show another.

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Ritesh,

Without going into the "how" part - it can be done by macros. You can place a transparent over the column C. Click on the button will run the macro to hide/show colums.
To hide a column in pivot table - if it is a dimension, the only way I ever used is to set its width to 0. To hide expression column is probably better by disabling the expression.

Maybe the best way is to create two tables - one with columns C1, C2, C3, and another without. Button will simply hide one table and show another.

Not applicable
Author

Thanks Michael.

I tried overlaying the transparent button and wrote a macro to disable/enable the C1, C2 and C3 columns and it worked the way I wanted.

But I am against a different issue now because as the column header position is changed the button still remains at the prev position and I am not able to click the button by clicking the header C1. is there anyway to tie the button and column header together.

Or for your next solution creating a separate table..may not work because the rows wbetween the tables will not tie to each other or I am missing something here?

Anonymous
Not applicable
Author

Ritesh,
I didn't know the the C-column changes position. It makes things a little harder. You still can resolve it by adding script to your macro that moves button position (search for Left and Rect in API guide).
As for the separate tables solution, I don't know why it should be a problem without knowing the table structure. Well, you have the one-table solution almost ready...