Documents for QlikView related information.
This app simulates how the sort order in a chart can be governed by a user option.
Recognised use cases for custom sort orders in charts include:
1. Managing the sort order of charts through chart properties without need for script change and refresh
2. User customisable sort order of dimension values (self service propositions)
3. Setting priority sort orders for subset of dimension values whilst retaining freedom to sort non-priority items by other logic
4. Varying sort order according to audience (e.g. multi-customer applications, where logged in customer wants to see their performance consistently presented at the top / first)
Thanks for sharing
Nice one Jonas..
Looks good Jonas, this was exactly what I was looking for. I'm was a bit concerned that you have copyrighted it. Can you let me know if I am able to use this expression in my applications without recourse?
No worries - just don't take the actual qvw I've produced and sell it on as training please, that is what the copyright is there to prevent.
The syntax tips and learnings are free for everyone to reuse / enrich / repurpose any way they like - I intend to share a lot more like this future wise. Any reference back to the author of particularly useful nuggets is of course appreciated but not mandatory.
Mob: +44 (0)7446 144 572
Tel: +44 (0) 208 100 6515
Context Business Intelligence Ltd
Parkshot House, 5, Kew Road, Richmond, Surrey, United Kingdom, TW9 2PR
Here's a couple more examples of changing chart "sort" orders, these work with expressions:
I think these would be more efficient and easy to understand sort expressions for the two charts, respectively:
If(Customer='$(vFocusCustomer)', 0, 1)
If(Customer='$(vFocusCustomer)', 0, Rank(Sum(Value)))
In my simplistic example of comparison against a single value, I agree with you - match(...) is over-engineered. With minor tweaks, match(...) allows for setting priority sort for a bundle of values whereby you may have three focus products or competitor brands that you wish to prioritise, not just the one.
Thanks for the feedback, simplification where possible is always good - a hunch tells me your version will more often than not be sufficient to meet client needs.
Jonas Valleskog The example is very useful. Thanks for sharing.
Good info. Thanks for sharing.