Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mslottje
Creator II
Creator II

Exclude value in loading script

Hi guys,

I have a script where I load all of my credits.

There is one specific credit note that has to be excluded.

I tried to do this by using the following expression in my script:

Credit:

LOAD

     No_ as [Item],

    "Sell-to Customer No_" as [Sell-to-Customer],

    "Document No_" as [Invoice Number]

FROM ["our database".qvd]

(qvd)

WHERE([Invoice Number] <> 'Credit-1234')

That didn't work. Would be great if you guys could help me out:)

Mike

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Try wit match()

Where match(Document No_,'credit-1234')=0:

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

8 Replies
vinieme12
Champion III
Champion III

Try wit match()

Where match(Document No_,'credit-1234')=0:

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
jayaseelan
Creator III
Creator III

Hi Mike,

Try the following script.

Credit:

LOAD

     No_ as [Item],

    "Sell-to Customer No_" as [Sell-to-Customer],

    "Document No_" as [Invoice Number]

FROM ["our database".qvd]

(qvd)

WHERE NOT WILDMATCH(invoicenumber,'*credit-1234*');

THANKS

sravanthialuval
Creator
Creator

Hi,

Aliases which will you created in the table, we can't  able to reuse in the same table.

Try this below code using original field name in where condition.

Credit:

LOAD

     No_ as [Item],

    "Sell-to Customer No_" as [Sell-to-Customer],

    "Document No_" as [Invoice Number]

FROM ["our database".qvd]

(qvd)

WHERE  "Document No_" <> 'Credit-1234' ;

mayuresh_d
Partner - Creator
Partner - Creator

hi,

it is best to use match as invoice number has text data type  . hence use following script

Credit:

LOAD

     No_ as Item,

    "Sell-to Customer No_" as Sell-to-Customer,

    "Document No_" as Invoice_Number

FROM ["our database".qvd]

(qvd)

WHERE NOT MATCH(Invoice_Number,'*Credit-1234*');

ogster1974
Master II
Master II

Credit:

LOAD

     No_ as [Item],

    "Sell-to Customer No_" as [Sell-to-Customer],

    "Document No_" as [Invoice Number]

FROM ["our database".qvd]

(qvd)

WHERE NOT MATCH([Document No_], 'Credit-1234')

mslottje
Creator II
Creator II
Author

That works!:)

mslottje
Creator II
Creator II
Author

That is also working! Unfortunately I can't give two answers the correct button..

Thanks Andy and Sravanthi!

rahulpawarb
Specialist III
Specialist III

Hello Mike,

I agree with Sravanthi! Use Field Name in WHERE criteria i.e. WHERE  [Document No_] <> 'Credit-1234' ;

Regards!

Rahul