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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sort by colomn name

Hello Experts

                   I need a small help regarding a macro ... I'm creating a trigger to sort by a specified colomn in a chart but in this case i want to use colomn names instead of using colomn no.'s as SortBy 0 / SortBy 1

so is there any way that i can sort by colomn name in a macro .

Here is the sample code of my macro that how i wrote ...

set chart1 = ActiveDocument.GetSheetObject("CH01")

     chart1.SortBy 0

     set chart1 = ActiveDocument.GetSheetObject("CH02")

     chart1.SortBy 2

Thanking u all

Meher

Labels (1)
5 Replies
IAMDV
Master II
Master II

Hi Meher,

Instead of using macro why don't you use variable? I mean you can sort by expression and then use the triggers to set the expression in the variable which will sort your expression.

For example :

I am using $(vChartSorting) variable in the sort by expression for the chart object. And then actions of button click event I am setting the variable value as SUM(Amount)/Count(ID) for vChartSorting variable.

I hope this helps!

Cheers - DV

Not applicable
Author

Thanks for reply DV

but can you explain a litle bit briefly may be with some sample QVW's which helps me a lot ...

thanks

Meher

IAMDV
Master II
Master II

Hi Meher,

You are welcome. Sure, but can you please post your sample QV document? And also give more details on how you wanted to sort the data. I can work an example from your data.

Cheers - DV

IAMDV
Master II
Master II

Hi Meher,

Have you got this working? or do you need more help on this post?If yes, then please post the sample QV document with more explanation on what you wanted to achieve.

Good luck!

Cheers - DV

Not applicable
Author

Hi DV

Sorry for replying late ...

that issue was solved for me thanx for your help

Meher