Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In theory when I concatenate two tables the total of rows will be the sum of the rows in each table but that is not what is going on with my script.
If I load the tables separely (in different QVW files), this is the number of rows I get, which is correct.
# of rows in table 1: 37,690,284
# of rows in table 2: 15,215,949
After I join the tables, this is what I get, which is absolutely wrong.
# of rows in table 1: 37,690,284
# of rows in table 2: 52,906,233
Does anybody knows what could be wrong?
This is my script:
Load
Key1
, Key2
, Key3
, Amount
, Quantity
From myQvd1.qvd(qvd);
Concatenate
Load
Key1
, Key2
, Key3
, Amount
, Quantity
From myQvd2.qvd(qvd);
Michael,
Regarding to the Year, one of my Key columns is Year, I renamed them here in this post to protect my customer's data structure.
Check carefully your data and logic. Try to make a calculation manually from your QV data. I'm pretty sure you will find a cause of the problem.
It is working now, but I cannot explain why.
I simply create another column called Balance. The 1st load I said 'Current Year' As Balance. In the 2nd load I said 'Prior Yer' As Balance.
Now and I do my year over year comparation, I use Set Analysis to indentify which Year I want:
Sum({$<Balance={'Prior Year'}>} Amount)
I also checked the data. Prior Year is only 2009, non 2010. Current Year is always 2010, none 2009. So I do not understand why my workaround made that work, but it is working.
Thank you all for your help.