Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning everyone,
I'm trying to use the Match function to custom sort text values in a certain field for my pie charts, but it doesn't work. Here is my expression:
=Match([Item 3: Length of Service],'More than 5 years','3-5 years','1-2 years','Less than 1 year')
Here is a quick video explaining my issue. Sorry for the poor sound quality.
Hi,
Where do you want to sort? In a stacked bar?
When i create a sample with your formula, i have a correct order. In lengend settings, have you tried "reverse order"?
I have tried to reverse the sort order, but to no avail.
Here is a quick video explaining my issue. Sorry for the poor sound quality.
Seems like it should be so straightforward but it's not and its driving me crazy.
Thanks for your help.
I think you might be in the wrong forum, looks like you're asking about Qlik Sense, not QlikView...
When dealing with sorting issues, I've always had the most luck by setting up the fields in question as Dual() types in my script (you can also create a duplicate of the field in your script as a dual and keep the original), with the numeric aspect then used to control the sort order. If you only have four values, which seems to be the case, you should be able to do that without too much trouble.
Thanks for your video. But you're on Sense not VIew. But, both should have the same behaviour.
Thanks for your suggestion. I will try this, but I am not sure how to go about it. Is it something that can be done from the sheet view or do I need to unlock the data load editor?
In your load statement, try with :
LOAD dual (Length, Num_lengt) as Length_of_service
INLINE [
Length, Num_lengt
More than 5 years,4
3-5 years,3
1-2 years,2
Less than 1 year,1
];
=Match(only({1} [Item 3: Length of Service]),'More than 5 years','3-5 years','1-2 years','Less than 1 year')