Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to arrange the values in a column in a specific order irrespective of the value on the right side(like hard coding the order the table value should appear).For example I want to show the name of countries in a order "India','UK','Australia','Canada','USA'", irrespective of the count value.Below i had attached sample qlikview to demonstrate my requirement
Go to Property->sort ->select Country->select Sort by Expression-> write
Match(Country,'India','UK','Australia','Canada','USA')
Regards
Hi Adam,
what you are expecting am not understanding clearly.
as per my understanding u want to display country in ascending order?
in this case go to properties select sort tab,
here you need to select country and select Text check box and then u select which order u want (a->z r Z->A)
so that values will display. if my assumption is wrong please mention clearly what you are expecting.
Hi
You can write expression in sort tab like,
if(only({1}Country)={'India'},11,if(only({1}Country)={'UK'},22,if(only({1}Country)={'Australia'},33,if(only({1}Country)={'Canada'},44,if(only({1}Country)={'USA'},55)))))
Thanks,
Vijeta
To make it generic and scalable, would suggest create an excel (or inline table) mapping with the two columns
Country, CountrySortOrder
India, 1
UK, 2
Australia, 3
Canada, 4
USA, 5
load it into your data model. And finally in your table/listbox Sort using expression = CountrySortOrder
Any changes/additions required, can easily be managed by just changing this mapping table.
Hi RyanAdam,
You can do this either by custom sort using dual or using the load order. check out the below url . Explained with example.
http://www.qlikfix.com/2010/12/27/creating-a-custom-sort-order-load-order-dual/
Hi thank you for the help
Your solution works fine for pivot tables and its not properly working for straight tables
Hi Ryan,
I've just tried the solution provided by max dreamer and it seems to work ok on the straight table in your qvw
Andy