Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
warfollowmy_ver
Creator III
Creator III

Change sort-priority in straight table with macro

I understood how to change the sorting order in expressions and dimensions of a direct table, but this doesn’t do anything for my task until I can control the sorting priority.

How can I use the macro to change the sort priority order in a straight table?

 

set chart=ActiveDocument.GetSheetObject("CH11")

set Prop = chart.GetProperties 

Prop.Dimensions.Item(0).SortCriteria.SortByNumeric = 1
Prop.Expressions.Item(0).Item(0).Data.ExpressionData.SortCriteria.SortByNumeric = 1

chart.SetProperties Prop

Labels (1)
1 Solution

Accepted Solutions
warfollowmy_ver
Creator III
Creator III
Author

set chart=ActiveDocument.GetSheetObject("CH11")

chart.SortBy 10

set Prop = chart.GetProperties 

Prop.Dimensions.Item(0).SortCriteria.SortByNumeric = 1
Prop.Expressions.Item(0).Item(0).Data.ExpressionData.SortCriteria.SortByNumeric = 1

chart.SetProperties Prop

 

View solution in original post

1 Reply
warfollowmy_ver
Creator III
Creator III
Author

set chart=ActiveDocument.GetSheetObject("CH11")

chart.SortBy 10

set Prop = chart.GetProperties 

Prop.Dimensions.Item(0).SortCriteria.SortByNumeric = 1
Prop.Expressions.Item(0).Item(0).Data.ExpressionData.SortCriteria.SortByNumeric = 1

chart.SetProperties Prop