Ability to change the sort order of filters on a Custom Query

John Phillips shared this idea 4 years ago
Idea Logged

I need to apply a custom sort order (not alphabetic) to the filter list and currently the only option is either ascending or descending alphabetically. This is using a Custom Query.


It would be great to be able to change the order of the filter list possibly using links to an org ref code and apply my own custom sorting.

Replies (5)

photo
1

Hi John,

Thank you for posting your product idea, we love to hear about new ways we can make the product even better and easier to use.

We review ideas each month and work with the Community to help encourage feedback to rank suggestions that we can present to our product team for review. Not all ideas make it into the product roadmap but all ideas lead to some new thinking for our team.

Keep sharing and as soon as the status changes on your post you will know if we have moved your idea into our product roadmap or a status of 'not planned'.

Thank you,

Paul

photo
1

You could possibly use a custom query for this unless the ordering is completely impossible, even then you may be able to brute force this:

Select colA
From (
  Select distinct colA, colD
  From TableB
) t1
Order by colD


or


Select colA
From (
  Select distinct colA, row_number() over(partition by colB order by colD descending) [col_ord] from TableB
) temp_table
order by [col_ord]


or brute force. My db has a calendar table. This final example changes the order of years

select year_name from
(
	select distinct Calendar.year_name, ord 
	from Calendar
	JOIN  (VALUES(2000, 5),(2001, 1), (2012,2), (2017, 3), (2019, 4)) order_table (year_name, ord)
		on order_table.year_name = Calendar.year_name
) t1
order by ord

photo
1

Actually, if you make the column a reference code with your sort options, then click on that column and choose add to filter, does it not keep the order?

photo
1

Yes - I have done this

It works well

photo
photo
1

I did try using a ref code, but it doesn’t seem to have worked in our case (cached filters using a custom query).

John Phillips

Implementation Manager

INX Software

Level 4, 1111 Hay Street West Perth  6005  WA Australia

phone: +61 (08) 9442 2800  |  support: 1300 746 084  |  web:  www.inxsoftware.com  | address: view map  |follow us: LinkedIn    

f92b8789770cdb9086f1a1f04526abd7

e7df01a3c1097c50da6237b9df83bf5e

From: Support Queue [mailto:support@Yellowfin.bi]

Sent: Wednesday, 24 July 2019 12:24 AM

To: John Phillips

Subject: New Comment in "Ability to change the sort order of filters"

photo
1

Ahhh - if you need to use a Custom Query it won't work

However - if you don't - you need to set the Format to the Reference Code you want to use 2e612a45b0c61b1e291b9f481bd06332Then you simply do this in the Filter Formatting

03d7f57f5d27313b114768d82ce50bc1

Leave a Comment
 
Attach a file