Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exclude values

I would like to exclude all values for a field that are a certain length.

The reason for this is because a user has entered a false value against an invoice of 4 billion odd.  This has been invoiced and then credited in our ERP system, but still shows in QlikView and really screws up the legends on our charts.

I'm guessing the easiest way would be to just if the invoice value is more than 9 characters trim to null as we will be dealing with a + and - value.

Any advice would be greatly appreciated.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Lewis,

You can check for the length of that field in the script, and set its value to 0, so when it's aggregated or summed in the script will return 0.

LOAD ...

     If(Len(InvoiceValue) > 9, 0, InvoiceValue) AS InvoiceValue,

     If(Len(InvoiceValue) > 9, 1) AS FlagIncorrectInvoiceValue,

...

Hope that helps.

Miguel

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hi Lewis,

You can check for the length of that field in the script, and set its value to 0, so when it's aggregated or summed in the script will return 0.

LOAD ...

     If(Len(InvoiceValue) > 9, 0, InvoiceValue) AS InvoiceValue,

     If(Len(InvoiceValue) > 9, 1) AS FlagIncorrectInvoiceValue,

...

Hope that helps.

Miguel

Not applicable
Author

Perfect, thank you Miguel!