Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How can I create a filter based on the result of one column

Hi,

I am trying to create a filter on QlikView, for example I have the following data in one column: 1,2,3,2,4,5,6,4,2,5,6,9,6,3,8,6,9,9,10

The filter should group the information as the following:

If value >=3, A

If value >3 or <=6, B

If value >6, C

I will like to see only these 3 options (A,B,C)

I have create a list box and in the expressions I have set:

If (value >=3,'A', if (value >3 or value <=6,'B', if (value >6,'C')))

The problem is that instead of show only the values A, B, or C, it displayed all the values in the field and next to each value the result, for example:

1 - A

2 - A

3 - A

2 - A

4 - B

5 - B

...

10 - C


Is there a way to instead of have all the values, only display the 3 options????

1 Solution

Accepted Solutions
sunny_talwar

Click on the drop down (circled in the below image) and then click on Expression:

Capture.PNG

View solution in original post

9 Replies
sunny_talwar

Why don't you create this in the script itself:

LOAD value,

          If(value > 6, 'C',

          If(value > 3, 'B', 'A')) as Group

or just try this as your list box expression:

If(value > 6, 'C', If(value > 3, 'B', 'A'))

sunny_talwar

Check this out

Capture.PNG

Anonymous
Not applicable
Author

This does not work for me

This is what I got:

Capture.JPG

This is the the expression that I am using:

If(DaysEscalated > 90, '90 + Days', If(DaysEscalated > 60, '60 to 90 Days', '1 to 60 Days'))

I have checked your qlikview file but I am not sure where do you set that, can you please show me the steps to configure it?

I will appreciate that.

sunny_talwar

I think you might be doing this on the expression tab, but you need to enter this expression on the general tab

Capture.PNG

Anonymous
Not applicable
Author

I am new on QlikView, can you please be more specific. where can I set those expressions in the general tab?

sunny_talwar

Click on the drop down (circled in the below image) and then click on Expression:

Capture.PNG

Anonymous
Not applicable
Author

IT WORKED!!!!! THANK YOU VERY MUCH!!!!

Anonymous
Not applicable
Author

Hi Roberto,

We're glad to see you got the solution you were looking for. Please take a moment to mark replies as correct or helpful, in order to give credit to those who helped you and to designate this thread as Answered.

For more information, see Qlik Community Tip: Marking Replies as Correct or Helpful

Thank you,

Qlik Community Team

sunny_talwar

Awesome, I am glad it finally worked out.

Best,

Sunny