Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tahirkhalil
Creator
Creator

Applying Filter To Straight Table

Hi

I am stuck up with a problem. I want to filter data from straight table based on some variable condition. Please see the attached file and suggest how can I achieve this?

Regards,

TK

1 Solution

Accepted Solutions
sunny_talwar

Is the issue with these two buttons?

Capture.PNG

Try these expressions for 'Select in Field' action:

1) ='(' & Concat(If(Score>=$(Variable1), StoreCode), '|') & ')'

2) ='(' & Concat(If(Score<$(Variable1), StoreCode), '|') & ')'

View solution in original post

15 Replies
sunny_talwar

I am not sure what is not working in your posted qvw? There is not explanation here or in the qvw which can help us understand your requirement. Do you mind telling us what are you trying to do?

sunny_talwar

Is the issue with these two buttons?

Capture.PNG

Try these expressions for 'Select in Field' action:

1) ='(' & Concat(If(Score>=$(Variable1), StoreCode), '|') & ')'

2) ='(' & Concat(If(Score<$(Variable1), StoreCode), '|') & ')'

tahirkhalil
Creator
Creator
Author

Great !

This is what I need to achieve.

The only issue left is if all stores are non-compliant the selection does not clear the selection in straight table.

Regards,

TK

Not applicable

It looks like the issue is no data being filtered when the text boxes are clicked?  It appears there is an issue with the actions you have defined.

You could also add a list box using the same expression being usied for the compliance satatus field in the table

=if(Score>=Value,'Compliant', 'Non-Compliant')

Anonymous
Not applicable

Khalil, the Sunny's proposed solution works fine !

sunny_talwar

I am not sure what you mean? You mean to say that when everything is non-compliant and someone select Compliant Stores you would not want to see anything in the straight table?

Anonymous
Not applicable

Sunny & Khalil

I propose an improvement that is before the first 'select in field action' to search by '*' in ' StoreCode ' field . Without this improvement the action does not run immediately, so requiring  the button click twice.Sem título.png

tahirkhalil
Creator
Creator
Author

Yes - if there is no compliant store, the list box become empty.

I got number of rows in table. if someone increase the value of compliance threshold, sometime, it may happen that all the stores become non-compliant, therefore, the list box should be filtered accordingly showing no rows.

tahirkhalil
Creator
Creator
Author

Hi Evandro,

This is still need double click if we dont clear the selection.

Seems * is not working.