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

Ignore certain rows of data?

I have some transactional data, as you can see in the chart below.

However, we have a problem in that every now and again, one half of a transaction will be conducted in one week and the second half of it will be conducted the next week, which totally skews the figures. There is always a positive value to one side of these transactions and a negative value on the other side.

You can see below, the last 5 weeks of data are correct, but the data in the first two weeks is totally wrong.

data.bmp

This is a long shot, but is there any way for Qlikview to somehow determine erroneous transactions such as these and automatically ignore them where the two sides of the same transaction do not occur in the same week? Or even for it to somehow 'fix' the data?

I'm a bit new to Qlikview, so apologies if this a stupid question!

2 Replies
ThornOfCrowns
Specialist II
Specialist II

Could you post an example of the data you're using to generate that chart?

Also, have you tried putting an expression like =WeekName(Transact_date) into a straight table to see if the data then falls into better "chunks"?

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi Alex,

it sounds here like you're going to need to do some scripting to eliminate / group these records during your load.

I'm guessing here that there's an ID field that links the positive and negative values together. And a date that's associated with each record, e.g TransactionDate. And, of course a value field.

In your script, you could do something like:

LOAD

     ID,

     TransactionDate,

     Value,

     if(Peek('ID', -1) = ID, 1, 0) as CompletedTransaction,

     if(Peek('ID', -1) = ID, Peek('Value', -1) + Value, 0) as CompletedTransactionValue

FROM [your source]

ORDER BY ID, TransactionDate;

This would group together pairs of ID values. Then, simply chart CompletedTransactionValue.

Marcus