Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!
cancel
Showing results for 
Search instead for 
Did you mean: 
Denzyl
Contributor II
Contributor II

Filter data from an ODBC database by string slicing

When loading a table from an ODBC, I would like to filter the dataset based on a column that ends with a certain value.

I have a column [code] that is made up of various text of different length.

I am trying to filter all the rows that does not have a [code] ending with AP.

I tried the following code but it does not work

Denzyl_0-1662109305053.png

 

Labels (1)
1 Solution

Accepted Solutions
Aurelien_Martinez
Partner - Specialist
Partner - Specialist

Hi,

In the documentation we have all operator you can use : https://help.qlik.com/en-US/sense/August2022/Subsystems/Hub/Content/Sense_Hub/LoadData/Filter-data-c...

 

Perhaps with : code NOT LIKE '%AP'

Example with my data on snowflake

amartinez35_0-1662121703704.png

 

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

4 Replies
IamBack
Champion
Champion

use Below

 

Wildmatch( FIeldName,'*AP')

or 

If(WildMatch(FIeldName,'*AP'),FIeldName) as Test.

 

See the attached Example where we want to filter  Date where we have 22 in END 

Sunil Chauhan
Denzyl
Contributor II
Contributor II
Author

Hi, I've tried to use Wildmatch, and it did not work as well.

Just to be clear I am trying to use the Filter data option in the "Edit Selections" page when loading data from an ODBC connection not trying to write the loading script, using the load editior.

Aurelien_Martinez
Partner - Specialist
Partner - Specialist

Hi,

In the documentation we have all operator you can use : https://help.qlik.com/en-US/sense/August2022/Subsystems/Hub/Content/Sense_Hub/LoadData/Filter-data-c...

 

Perhaps with : code NOT LIKE '%AP'

Example with my data on snowflake

amartinez35_0-1662121703704.png

 

Help users find answers! Don't forget to mark a solution that worked for you!
Timario
Contributor III
Contributor III

Hi, in filter try use keyword like
right(code,2) like 'AP%'.  It means that 2first symbols of code start with AP. 
right(code,2) like '%AP%'. It means that 2first symbols of code has AP.
right(code,2) like 'AP%'. It means that 2first symbols of code  end AP.