Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am new to qlikview .I am loading month into ListBox. The months were not displaying in proper sequence so i did some googling and got the below expression,
=match([Month Name],'Jan','Feb','March')
The above expression work for me and months were displayed in Jan,Feb,March.... i.e. as expected.
When i tried to figure out what does the expression means, the function "Match" according to qlik.com returns "returns the number of the expression that matches".
Now i am not able to figure our the logic, match returns a number of expression that matches but how could that sort my items in ListBox.
So based on your dimension value, the number is assigned to it and that number is used to sort the list box.
=Match([Month Name], 'Jan', 'Feb', 'March')
will assign Jan = 1, Feb = 2, and March = 3 and this 1, 2, 3 are used to sort your list box based on ascending/descending order you choose.
Is this what you wanted to understand?
So based on your dimension value, the number is assigned to it and that number is used to sort the list box.
=Match([Month Name], 'Jan', 'Feb', 'March')
will assign Jan = 1, Feb = 2, and March = 3 and this 1, 2, 3 are used to sort your list box based on ascending/descending order you choose.
Is this what you wanted to understand?
Hi Sunny,
Thanks for the reply, it help me understood the expression. I have 1 more question. When i select the month from the ListBox , then again the month are distorted. I have attached the image for more better understanding of my problem.
This is what you need then
=Match(Only({1} [Month Name]), 'Jan', 'Feb', 'March')
The issue is that as soon as you select a particular month, the Month Name function only shows that particular month and then everything else become a 0. Adding {1} ignore any selection and your sort order stays intact.
HTH
Best,
Sunny