Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Pivoting in macro

Hi all,

how can i do "Pivoting" in VBScript macro?

that means that for example, i have created a PivotTable with two dimensions in my macro and then i need to send one of this dimensions on horizontal axis.

Best regards

Peyman

1 Solution

Accepted Solutions
Highlighted
Creator III
Creator III

I have found the correct answer. It's like this :

SUB mySUB

     SET chart = ActiveDocument.Activesheet.CreatePivotTable

     chart.AddDimension "Product"

     chart.AddDimension "Year"

     chart.AddExpression "sum(Amount)"

     cp = chart.GetProperties

     cp.TableProperties.NumberOfLeftDimensions = 1

     chart.SetProperties cp

END SUB

View solution in original post

1 Reply
Highlighted
Creator III
Creator III

I have found the correct answer. It's like this :

SUB mySUB

     SET chart = ActiveDocument.Activesheet.CreatePivotTable

     chart.AddDimension "Product"

     chart.AddDimension "Year"

     chart.AddExpression "sum(Amount)"

     cp = chart.GetProperties

     cp.TableProperties.NumberOfLeftDimensions = 1

     chart.SetProperties cp

END SUB

View solution in original post