Discussion Board for collaboration on QlikView Scripting.
I have a problem in loading script. I don´t know what is wrong.
In a QVD file with several columns I want to apply SUM function.
Year Product PRV Amount
2014 prdA A 24720
2014 prdB A 24720
I do apply SUM function like this:
load PRV,SUM(Amount) as SAmount from QVD.qvd (qvd)
group by PRV;
Finally, when I create a Table from FINAL_QVD I get this:
Go to Solution.
it's going to be difficult to work out what's going on here, but it certainly looks like you have duplicates.
You could try adding count(Amount) to see if this is the case.
I'd suggest that you need to look at the code that's creating your original QVD.
View solution in original post
the distinct field is product, so either you add it as part of your group or you apply a distinct to your sum
load distinct PRV,SUM(Amount) as SAmount from QVD.qvd (qvd)