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: 
Not applicable

Filtering on specific values (like)

Hello all

Recently started using Qlik so apologies if this is a very basic thing ...

Was wondering how i could display in my Bar Graph only values that contain the number 1.

In SQL, what i am used to, it would be something along the lines of:

select 'Column1' from 'MyTable' where 'Column1' like '%1%'

... how would this logic translate to Qlik?

I have read up on WildMatch but cannot get this to work...

Thank you in advance

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this if you want this in script

DataL

LOAD Column1

FROM MyTable

WHERE wildmatch(Column1, '*1*');


In chart using Set Analysis


=Sum({<Column1={'*1*'}>} MeasureName)


Hope this helps you.


Regards,

Jagan.

View solution in original post

6 Replies
Gysbert_Wassenaar

Something like this:

LOAD Column1

FROM MyTable

WHERE wildmatch(Column1, '*1*');


You could also try WHERE substringcount(Column1, '1')>0


talk is cheap, supply exceeds demand
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this if you want this in script

DataL

LOAD Column1

FROM MyTable

WHERE wildmatch(Column1, '*1*');


In chart using Set Analysis


=Sum({<Column1={'*1*'}>} MeasureName)


Hope this helps you.


Regards,

Jagan.

ogster1974
Partner - Master II
Partner - Master II

This is another approach to populate your Bar Chart.  Rather than modify the LOAD create an expression using the WildMatch to extract the values you want.

If(Column1=Wildmatch(Column1,'*1*'), Count(Column1))

Not applicable
Author

Hello Andy

Thanks very much for your response!

I have tried your suggestion but I am getting 'No data to display' on my chart area.

Just so you are aware, I am using an Excel spreadsheet for my data source.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Did you tried this expression?

=Count({<Column1={'*1*'}>} Column1)


Regards,

Jagan.

Not applicable
Author

Hello Jagan

Yes I just tried it now and it worked a treat!

Thank you very much !