Qlik Community

Ask a Question

New to Qlik Sense

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

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Champion II
Champion II

Try wit match()

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

View solution in original post

8 Replies
Champion II
Champion II

Try wit match()

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

View solution in original post

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

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

Partner
Partner

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

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

Creator II
Creator II

That works!:)

Creator II
Creator II

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

Thanks Andy and Sravanthi!

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