Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can i do "Expand All" in a pivot table by macro?

Hi all,

I'm new in the QlikView and I didn't find a way to Expand all levels from a pivot table using a macro.

Is that possible? Anybody know how can i do that?

Thanks in advance

Tiago

1 Solution

Accepted Solutions
Not applicable
Author

I already find what i was looking for.

I did it something like the code below:

'To expand all levels from my pivot table

  set chart = ActiveDocument.GetSheetObject(pivotTableID)

  set ch = chart.GetProperties

  ch.TableProperties.PivotAlwaysFullyExpanded=true

  chart.SetProperties ch

'To collapse all levels from my pivot table

  set chart = ActiveDocument.GetSheetObject(pivotTableID)

  set ch = chart.GetProperties

  ch.TableProperties.PivotAlwaysFullyExpanded=false

  chart.SetProperties ch

It worked exactly how i needed. I found the solution in another question, here is the reference: http://community.qlik.com/thread/74102

Tiago

View solution in original post

1 Reply
Not applicable
Author

I already find what i was looking for.

I did it something like the code below:

'To expand all levels from my pivot table

  set chart = ActiveDocument.GetSheetObject(pivotTableID)

  set ch = chart.GetProperties

  ch.TableProperties.PivotAlwaysFullyExpanded=true

  chart.SetProperties ch

'To collapse all levels from my pivot table

  set chart = ActiveDocument.GetSheetObject(pivotTableID)

  set ch = chart.GetProperties

  ch.TableProperties.PivotAlwaysFullyExpanded=false

  chart.SetProperties ch

It worked exactly how i needed. I found the solution in another question, here is the reference: http://community.qlik.com/thread/74102

Tiago