Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Partner - Master II
Partner - Master II

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


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


Regards



Andy

View solution in original post

8 Replies
pedrolyra
Contributor III
Contributor III

Hey mate,

You can load with a condition like this:

where len(LoadNumbers)=6

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



ogster1974
Partner - Master II
Partner - Master II

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

arvind_patil
Partner - Specialist III
Partner - Specialist III

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

'

Anonymous
Not applicable
Author

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 

Anonymous
Not applicable
Author

See attached file

ogster1974
Partner - Master II
Partner - Master II

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
Contributor III
Contributor III

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);

Anonymous
Not applicable
Author

Thank you - works well