Does anyone know how can I do something automatic in qlikview? It is that
In pivot table, you know there are dimensions hided in + and we expand it all to be able to see each dimension further. My question is is there a way to do it automatically expanded in a simple button instead of doing it manually? Maybe in macro or similar...?
I am thankful for the code I have received about pivot expanding and collapsing macro. However , I want to make it run when i qlik on to button to expand and for another button when i qlick it to collapse. Qlikview does not understand it or maybe I dont know how to do it. Do you have any advice for it?
I am more than grateful for your response with very helpful tutorial. It works perfect in my project now. It expands all and collapse all. That is perfect. However, the only thing I wanna do that when I qlik the button to collapse, the pluses ( + ) dissepear. I really want them to stay and just expand and collapsed. Now they dissepear and I lose my will to select if I dont wanna use the button. There might be other way like running macro but I may not know some details to work like with + s. In this project I got, would be nice if I would be able to work it well and could still see pluses.
Would you have any advice for that?
Many thanks, Feeling lucky to have that professional environment in here as I'm kinda newbie for qlikview.
I do know it. But our customer doesnt want to do that. The reason I want it quick and automatic by using button or qlik. The customer should be able to also see the plusses. But they dissepear. (I mean I work the section in the qw file u sent is "Conditional (dynamic) Columns" last section of pivot table.
Sub ExpandChart 'This macro fully expands the selected pivot table. On Error Resume Next
Set vChartToExpand = ActiveDocument.Variables("vChartToExpand") Set chart = ActiveDocument.GetSheetObject(vChartToExpand.GetContent.String) Set gp = chart.GetProperties gp.TableProperties.PivotAlwaysFullyExpanded = TRUE 'not gp.TableProperties.PivotAlwaysFullyExpanded chart.SetProperties gp End Sub
Sub CollapseChart 'This macro allowse collapsing of the selected pivot table. On Error Resume Next
Set vChartToExpand = ActiveDocument.Variables("vChartToExpand") Set chart = ActiveDocument.GetSheetObject(vChartToExpand.GetContent.String) Set gp = chart.GetProperties gp.TableProperties.PivotAlwaysFullyExpanded = FALSE 'not gp.TableProperties.PivotAlwaysFullyExpanded chart.SetProperties gp End Sub
You need to create a variable vChartToExpand that contains the chart ID and 2 buttons, one for expand and one for collapse, you will see the +/- when the chart is Collapsed, but NOT when its fully expanded, there's no way round this..