Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I set dimension limits with VBScript macro?

Hello everyone,

please help me with setting up dimension limits with VBScript macro.

I can't find any reference in API how to do this.

If you have an example code please post it here.

If you have an idea where to look for documentation please respond as well.

Thanks in advance

1 Solution

Accepted Solutions
Not applicable
Author

Hi Victor,

API Guide contains  some information, but it is not documented well, there are no examples and description.

You should check IOtherTotalSpecProp class.

see the following example

Top 10 Largest values:

set chart = ActiveDocument.Activesheet.CreateStraightTable

chart.AddDimension "ProductType"

chart.AddExpression "sum(Amount)"

set cp = chart.GetProperties

set dims = cp.Dimensions

dims(0).OtherTotalSpec.OtherMode = 1

dims(0).OtherTotalSpec.OtherCounted.v = 10

chart.SetProperties cp

Best Regards,
Ruslan

View solution in original post

4 Replies
Not applicable
Author

Hi Victor,

API Guide contains  some information, but it is not documented well, there are no examples and description.

You should check IOtherTotalSpecProp class.

see the following example

Top 10 Largest values:

set chart = ActiveDocument.Activesheet.CreateStraightTable

chart.AddDimension "ProductType"

chart.AddExpression "sum(Amount)"

set cp = chart.GetProperties

set dims = cp.Dimensions

dims(0).OtherTotalSpec.OtherMode = 1

dims(0).OtherTotalSpec.OtherCounted.v = 10

chart.SetProperties cp

Best Regards,
Ruslan

Not applicable
Author

It works! Thank you very much!

nivellen11
Contributor III
Contributor III

Any idea how to set properties in this way?

Greater than or Equal to    40%    exact amount

Show Others

08-04-2014 12-06-53.png

Not applicable
Author

Hi,

what would you add to the script to tell it to reverse these dimension limits if they are set?

regards

Lukas