Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Qlikview and have been getting some problems in trying to manage some invoices which we are pulling out of a database to analyse.
My problem is that we are pulling through invoices that are unique and valid from our database.
The Issue is:-
The Solution I am looking for is:-
The fields that are the same are Invoice Number, Invoice Item and Billing date, the field that changes is the condition record.
I am not sure if there is a way in Set Analysis to filter these out, or if there is a way to stop this in the script itelf.
Thanks for any help recieved.
Why don't you add a distinct / group by clause in the SQL query at the loading?
Select
distinct
Invoice Number, Invoice Item, Billing date
from table
or
Select
Invoice Number, Invoice Item, Billing date
// add some min / max clause to merge all the lines into 1
from table
group by Invoice Number, Invoice Item, Billing date
or in Oracle to get only the first line of each Invoice Number, Invoice Item, Billing date (assuming that a field "line_number" allows you to find which is the first
Select
Invoice Number, Invoice Item, Billing date
,min(<attribute1>) keep (dense_rank first order by "line_number") "ATTRIBUTE1_FIRST_LINE"
,max(<attribute2>) keep (dense_rank first order by "line_number") "ATTRIBUTE2_FIRST_LINE"
from table
group by Invoice Number, Invoice Item, Billing date