Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change the label for a Dimension

Is there a way to change the label for a dimension in pivot table in a macro vbscript ? I have the right syntax to change the label for an Expression in a pivot table :

set props = summaryTable.getProperties
set expr = props.Expressions.Item(0).Item(0).Data.ExpressionVisual
expr.Label.v = "Sales $(vCurrentYear)"
expr.NumAdjust = 1    'center
expr.LabelAdjust = 1    'center
summaryTable.SetProperties props

How can I adapt to change the label of a dimension ?

Thanks in advance

1 Reply
Gysbert_Wassenaar

The label of a dimension is a title:

set chart = ActiveDocument.Activesheet.CreateStraightTable

chart.AddDimension "ProductType"

chart.AddExpression "sum(Amount)"

chart.AddExpression "count(Customer)"

set cp = chart.GetProperties

set dims = cp.Dimensions

dims(0).Title.v = "Type of product"

chart.SetProperties cp


talk is cheap, supply exceeds demand