Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

filtering 2 strings in the chart level???? need help please?????

Hi all,

Please can someone help me with the below issue??????????????????????

I have to filter  strings from a field and put it as expression in the chart.I was able to do it for one string using maxstring function.how do I combine both the condition in maxstring????? or any other method present???? please help.

The 2 strings to be filtered are :

1)"Past Expiration Out-Of-The-Money:  Option Value"

2)"Past Expiration In-The-Money:  Option Value"

maxstring({<fee_type-={'Past Expiration In-The-Money:  Option Value'}> }fee_type)

I have attached a sample file,in "sheet 3"where a field fee_type is selected.here the first 2 strings in them beginning from "Past" should be filtered in the table and hence only the values starting from "strike " should be seen in the table.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

In the script, try like:

Load

          field1,

          ....

          free_type

From <> Where Not WildMatch(free_type, 'Past*');

View solution in original post

7 Replies
tresesco
MVP
MVP

Try with wildchar - '*' , like:

=maxstring({<fee_type-={'Past*'}> }fee_type)      // 'Past*'

its_anandrjs

You can try with

maxstring({<fee_type-={'Past Expiration In-The-Money:  Option Value', 'Past Expiration Out-Of-The-Money:  Option Value' }> }fee_type)

Not applicable
Author

Hi,

thanks for the response.

This solution works only if I click on the field where these strings are present,but when I do a clear in the application it doesnt work.....  so how do I permanently filter out this???

tresesco
MVP
MVP

Try :

=maxstring({<fee_type=- {'Past*'}> }fee_type)    // neg sign after '=' sign

Not applicable
Author

Hi Tresesco,

thanks this solution helped in obtaining the result as required.One doubt ,cant this be used in the script itself,because whenever I used maxstring expression before in script the load used to stop abruptly just telling execution failed .

In case it is possible,can you please guide me as where I can place this condition in script???I have attached the sample.

tresesco
MVP
MVP

In the script, try like:

Load

          field1,

          ....

          free_type

From <> Where Not WildMatch(free_type, 'Past*');

Not applicable
Author

Hi Tresesco,

thanks a lot for ur valuable help.I am learning each time something from ur answers.

I have one peculiar requirement which is like:(lil difficult to explain) I will do it in a new discussion ,please help me out.will post it soon.