Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello dear Friends of QV ,
I need to know how to create a sort by Exoression value in Pivot tabke.
From this table:
Load * Inline [
salesman, qty, amount
Eric, 100, 2000
Paul, 2100, 2000
Slash, 5000, 7520
Fred, 800, 158
];
I build a pivot table..
I need to create a list box with ascending and descending value and cliking in this list box I would to sort by QTY ?
Someone could to help me?
Thanks
Best Regards
🙂
--
Slash
I have attached a sample app using the data you provided.
There is a macro which runs during the OnSelect of the Sort By field. The Sort By field is an inline having Descending or Ascending with One Always selected.
In the macro, we change the SortByExpression property (which controls sort order) depending on which is selected.
I use a variable set to "=GetFieldSelections("Sort By")" to hold the selection in the Sort By box. This could probably be skipped and all handled within the macro, but I think using a variable makes it a little easier to follow.
Thank you,
You used API code ...
Do you think is possible to use sql script?
Best Regards
--
Slash