Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hidden dimension in pivot table

    Hi guys,

Screen Shot 2013-10-26 at 12.57.56 AM.png

here is my pivot table. I have used few dimensions and i need to hide TxnLineId dimension but still want a view like this

RefNumber Rate

1                    11

                      120

                       10

                       10

i.e. i want to maintain the granularity of TxnLineID even if it is hidden.

Can we still have the granularity of a dimension even if it is hidden?

Saurabh

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Sub HideColumn

  set chart = ActiveDocument.GetSheetObject("CH01")

    set p = chart.GetProperties

    ' set the width of the 4th column to 0

    chart.SetPixWidth 3,0

End sub


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

No, but you can set the label of the dimension to a space and set the text color of the values to 100% transparent and resize the column to minimal width. You'll need a macro if you want to set the width to zero.

It's also possible to create a calculated dimension for the Rates, but then you would not be able to have subtotals. Dimensions are not totalled.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks for the solution!

Sorry for my ignorance but i could not find the macro. I did Ctrl+M but could not find any thing there.

Not applicable
Author

I also found that if I add another dimension after TxnLIneId then the + and - sign shows up for TXnLIneId. I guess this can be fixed by setting the minimal width to zero.

Can you please give a hint that how that macro can be written and used.

Gysbert_Wassenaar

Sub HideColumn

  set chart = ActiveDocument.GetSheetObject("CH01")

    set p = chart.GetProperties

    ' set the width of the 4th column to 0

    chart.SetPixWidth 3,0

End sub


talk is cheap, supply exceeds demand
Not applicable
Author

I added this macro as a function because my script was recognizing it as a macro. After adding it as function I am calling it as

Let v = HideColumn

but I saw that nothing happened then i added a MsgBox like

MsgBox "Got here" to see if MsgBox gets executed and it didn't so somehow my script is not calling this function...

My Macro security level is "safe Mode" and current local security is "only safe mode"