Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have a bar graph with dimension as 'category' which includes Diamond, Platinum, Gold, Silver and Others
how do i sort them in same order
thanks in advance
Hi Deepak,
You can use the Load Order for sorting or you can use the Match function.
Check this video from my blog post:
I hope this helps!
Cheers,
DV
Load * Inline
[
category, SortOrder
Diamond, 1
Platinum, 2
Gold, 3
Silver, 4
Others, 5
];
Create above Inline Table and go to sort table and add below in expression... Now sort by numeric ascending order
SortOrder
Or 2nd Method:
You can simply write below expression in your sort tab...
=Pick(Match(category,'Diamond','Platinum','Gold','Silver','Others'),1,2,3,4,5)
Manish Right applying the inline more easy and you can play some options in the sort tab itself.
Regards,
Ajay
Hi
or you can use an expression using match function in the sort tab
Thanks
Padma
If you load the categories as a DUAL value, the categories will sort automatically.
Dual(text value, numeric value) - Dual displays the text values but sorts by the numeric values.
Add this to your load script
Load
dual(Category, Pick(Match(Category, 'Diamond', 'Platinum', 'Gold', 'Silver', 'Others') ,1,2,3,4,5 )) as Category,
< the rest of your load script>
hi Manish,
I tried the 2nd Method but it didnt work
Check enclosed document...
???
You will have to wait until the moderators release the attachment before you can see it.