Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
souadouert
Specialist
Specialist

hinding expressions

Hello,

I have a pivot table, with 7 expressions the 7th expression is calculated by the 6 other expressions, and I want to hide them how

thank y

1 Solution

Accepted Solutions
sunny_talwar

I used this

SUB Squeeze

  CALL HideColumn("CH02", 3)

END SUB

PRIVATE SUB HideColumn(ch, n)

  SET ch = ActiveDocument.GetSheetObject(ch)

  ch.SetPixWidth (n-1), 0

END SUB

Capture.PNG

See how the two columns are almost hidden in the below table.... I used two buttons just to show that in the sample app

View solution in original post

10 Replies
sunny_talwar

You will need to use a one time Macro to make the column width = 0

Pivot Column Width to Zero

souadouert
Specialist
Specialist
Author

Hi sunny;

i added the  macro but i dont know how and where  i call this macro

sunny_talwar

Use a button object to use the Macro. This has to be done only one time for each column. After that you can remove the macro and delete the button

souadouert
Specialist
Specialist
Author

sunny  i have this issue

Capture.PNG

sunny_talwar

What is the issue? Sorry not sure I understand

souadouert
Specialist
Specialist
Author

Capture.PNG

sunny_talwar

What is the exact Macro you used? Can you paste it here?

souadouert
Specialist
Specialist
Author

sub Squeeze

call HideColumn("CH121",5)

end sub

'

private sub HideColumn(ch, n)

set ch = ActiveDocument.GetSheetObject(ch)

ch.SetPixWidth (n-1), 0

end sub

sunny_talwar

Check out the attachment