
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Custom Sort
Hello Everyone ,
I want to implement custom sort on country. i have already tried below two approaches
1. Sort expression match(Country, 'Sweden', 'Denmark', 'Norway', 'Others')
2. in Script creating n inline table
CountrySort:
MAPPING Load * inline [
"Country " , Sort
Denmark,2
Sweden,1
Norwary,3
Other,4
];
Dual("Country ",Applymap('CountrySort',"Country ")) as "Country"
both gives me wrong order.
Any suggestions
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the back end write in preferred sorting order. Simply write InLine with the same field name you wish to sort. Like
temp_sort_country:
LOAD * INLINE [
Country
Sweden
Lithuania
Denmark
USA
];
At the end of the back end script drop the table.
Drop Table temp_sort_country;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another approach
CountrySort:
Load *, Dual("Country ",Sort) as Dual inline [
"Country " , Sort
Denmark,2
Sweden,1
Norwary,3
Other,4
];
Now you can call, Dual field in sort expression


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If using the temp_sort_country table, make sure you uncheck all the sort options to cause it to use the load order.
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the back end write in preferred sorting order. Simply write InLine with the same field name you wish to sort. Like
temp_sort_country:
LOAD * INLINE [
Country
Sweden
Lithuania
Denmark
USA
];
At the end of the back end script drop the table.
Drop Table temp_sort_country;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
where are you trying to have a custom sort

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another approach
CountrySort:
Load *, Dual("Country ",Sort) as Dual inline [
"Country " , Sort
Denmark,2
Sweden,1
Norwary,3
Other,4
];
Now you can call, Dual field in sort expression

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Nope it didn't work. I have created a tale with preferred order n drop that table at very end of script. but still its shows wrong order.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried in Chart--> sorting--> sort by expression and
in data editor .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Can u please attach the QVF?
Thanks
Kashyap.R


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If using the temp_sort_country table, make sure you uncheck all the sort options to cause it to use the load order.
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks for replying i tried but for some reason it didn't work.
I have a dim and in sorting i have added 'Dual' new field , it didn't work. Than i tried
match(Dual, 'Sweden','Denmark','Norwary','Finland','Other') it didnt work either

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes i have cross checked that too. i have a filter panel with one dim ie country ,

- « Previous Replies
-
- 1
- 2
- Next Replies »