Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have two QVD files. Sales and Sales_New.
Sales:
Date | Sales |
1/1/2016 | 100 |
1/2/2016 | 200 |
1/3/2016 | 300 |
Sales_New:
Date | Sales |
1/4/2016 | 400 |
1/5/2016 | 500 |
When I am trying to concatenate using below script, the records from Sales table is double counting.
Sales:
LOAD Date,
Sales
FROM
Sales.qvd
(qvd);
Concatenate
LOAD Date,
Sales
FROM
Sales_New.qvd
(qvd);
If I am using not exists (date). then it is fine. Why the above script showing double counting data? As per my understanding it should not.
Please advise.
Thanks,
Sarif
Have a look into the QVD files (or attach them here) and you will find your answer...
Hi,
I Tried your data in my local qlik desktop it not showing double count. Can you please post me Sales.qvd and Sales_New.qvd ? Let us check.
Thanks,
Please find the attached qvd.
Your new sales qvd has got all five dates data. Hope that answers.
Like Ruben mentioned above, your Sales_New doesn't just include the new data, it also includes the data from Sales.qvd
This is screenshot while I load data from Sales_New.qvd. Since the first three dates are available in both the qvds, you see them getting loaded twice. When you use Where Not Exists... the first three values don't get added and only the dates which are not in Sales.qvd gets loaded in.
According to your data your count of date is 2 For date(1/1/2016,1/2/2016,1/3/2016). below is your output.
Because your using Concatenate. The date is repeating.
instead of count(Date) you can use count(Distrinct Date) you will single count.
Thanks,