Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help Understanding a expression

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.

1 Solution

Accepted Solutions
sunny_talwar

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?

View solution in original post

3 Replies
sunny_talwar

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?

Not applicable
Author

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.

MonthSeq1.pngMonthSeq2.png

sunny_talwar

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