Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
Not applicable

Re: Exclude values

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

2 Replies
Miguel_Angel_Baeyens
Not applicable

Re: Exclude values

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

Re: Exclude values

Perfect, thank you Miguel!