Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
souadouert
Valued Contributor

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

Re: hinding expressions

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

10 Replies

Re: hinding expressions

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

Pivot Column Width to Zero

souadouert
Valued Contributor

Re: hinding expressions

Hi sunny;

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

Re: hinding expressions

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
Valued Contributor

Re: hinding expressions

sunny  i have this issue

Capture.PNG

Re: hinding expressions

What is the issue? Sorry not sure I understand

souadouert
Valued Contributor

Re: hinding expressions

Capture.PNG

Re: hinding expressions

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

souadouert
Valued Contributor

Re: hinding expressions

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

Re: hinding expressions

Check out the attachment