Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Function for strem !!!

Hi everyone:

Someone do you know some function that get the last stream that have for example the word 'CM' to the finally

for example:

items:

123456CM

a12d13x1x1CM

1234567810

wert12345678

CM 123456456

a1d3f5g6h6CM

aw-CM

I need Just the records that have in finally of the stream the word 'CM' please JUST only in the FINALLY  the word 'CM'

in the last example I need just:

123456CM

a12d13x1x1CM

a1d3f5g6h6CM

aw-CM

thanks can you help me!!!

Regards!!!

1 Solution

Accepted Solutions
Not applicable

Re: Function for strem !!!

I was looking for and the solution is:

where WildMatch(item, '*CM')

in this way I will have all records in the final have the word 'CM'

thanks very much for your help.

regards!!

6 Replies

Re: Function for strem !!!

Use Index function

Ex:-

Tab1:

LOAD * INLINE [

    items

    123456CM

    a12d13x1x1CM

    1234567810

    wert12345678

    CM 123456456

    a1d3f5g6h6CM

    aw-CM

] Where Index(items,'CM');

And you get output as

123456CM

a12d13x1x1CM

a1d3f5g6h6CM

aw-CM

Re: Function for strem !!!

Another one is

Tab1:

LOAD * INLINE [

    items

    123456CM

    a12d13x1x1CM

    1234567810

    wert12345678

    CM 123456456

    a1d3f5g6h6CM

    aw-CM

];

NewTable:

LOAD

items,

items as [CM items]

Resident Tab1

Where Index(items,'CM');

Not applicable

Re: Function for strem !!!

thanks a lot but the index in this way just get all records that have "CM" in any part of the stream that I need is all records to the finally it have 'CM' but any way I find the solution it's too easy but anand chouhan thanks for your help!!!!

regards

jerem1234
Valued Contributor II

Re: Function for strem !!!

If CM is always the last two letters, then you can use the conditional:

right(items, 2)='CM'

Hope this helps!

Not applicable

Re: Function for strem !!!

I was looking for and the solution is:

where WildMatch(item, '*CM')

in this way I will have all records in the final have the word 'CM'

thanks very much for your help.

regards!!

Not applicable

Re: Function for strem !!!

this way is correct also thanks

Community Browser