Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mohbeen_deen
New Contributor III

adding a Filter to separate Load Numbers

Hi There

How do I  add a Filter to separate Load Numbers in Qlik Sense? :

  • LoadNumbers with 6 digites that start with 2
  • LoadNumbers with 6 digites that start with 5
  • LoadNumbers with 6 digites that start with 8
  • Other
1 Solution

Accepted Solutions
ogster1974
Honored Contributor II

Re: adding a Filter to separate Load Numbers

If(len(loadnumbers)=6 and wildmatch(loadnumbers, '2*','5*','8*'), loadnumbers, null())


As a calculated dimension.. Then exclude nulls in your chart.


Regards



Andy

8 Replies
pedrolyra
New Contributor III

Re: adding a Filter to separate Load Numbers

Hey mate,

You can load with a condition like this:

where len(LoadNumbers)=6

and mid(LoadNumbers,1)='2';



ogster1974
Honored Contributor II

Re: adding a Filter to separate Load Numbers

Where len(loadnunbers)=6 and wildmatch(loadnumber, '2*','5*','8*')

arvind_patil
Valued Contributor II

Re: adding a Filter to separate Load Numbers

Hi Mohbeen,

May be like below:

if(len(LoadNumbers)=6 and left(LoadNumbers, 1) ='2', 'Statrt With 2',

  if(len(LoadNumbers)=6 and left(LoadNumbers, 1) ='5', 'Statrt With 5' ,

  if(len(LoadNumbers)=6 and left(LoadNumbers, 1) ='8', 'Statrt With 8','Other'))) as Filter1


Thanks,

Arvind Patil

'

mohbeen_deen
New Contributor III

Re: adding a Filter to separate Load Numbers

Hi Arvind

Thank you - it works to a degree as per below screenshot

LoadNumberpng.PNG

However as per my attached data, it should at least pull through the numbers 

mohbeen_deen
New Contributor III

Re: adding a Filter to separate Load Numbers

See attached file

ogster1974
Honored Contributor II

Re: adding a Filter to separate Load Numbers

If(len(loadnumbers)=6 and wildmatch(loadnumbers, '2*','5*','8*'), loadnumbers, null())


As a calculated dimension.. Then exclude nulls in your chart.


Regards



Andy

pedrolyra
New Contributor III

Re: adding a Filter to separate Load Numbers

Let me see if is something like this that you want


LOAD

LoadNumbers,

    IF(LEN(LoadNumbers)=6 AND LEFT(LoadNumbers, 1) ='2',

    '2',

      IF(LEN(LoadNumbers)=6 AND LEFT(LoadNumbers, 1) ='5',

        '5',

    IF(LEN(LoadNumbers)=6 AND LEFT(LoadNumbers, 1) ='8', '8','OTHER'))) as SIZELOADNUMBER

FROM [lib://DADOS/LoadNumbers.xlsx]

(ooxml, embedded labels, table is Sheet1);

mohbeen_deen
New Contributor III

Re: adding a Filter to separate Load Numbers

Thank you - works well