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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Different outputs for macro sorting

Hello,

I have a dynamic chart which created based on a macro script. And in that macro I have a sorting method for a specific column.

Sub SortChart 

  Set ch = ActiveDocument.GetSheetObject("ADHOC") 

  ch.SortBy 4

  

  Set p = ch.GetProperties 

  Set dims = p.Dimensions 

 

  i = dims.Item(0).SortCriteria.SortByNumeric 

  If i = 1 Then 

  dims.Item(0).SortCriteria.SortByNumeric = -1 

  Else 

  dims.Item(0).SortCriteria.SortByNumeric = 0 

  End If 

  ch.SetProperties p 

End Sub 

The weird thing is that in the Qlikview Application is sorting well, I have the desired output. Is sorting descending based on desired column.

But when I access the application from the web (linked to a server). Is sorting the chart ascending. I've tried to invert the 'SortChart' macro but nothing.

Do you have any idea why this is happening ?

Thank you!

10 Replies
Not applicable
Author

Thank you very much ! I used this method and is working perfect!