Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I´ve trying to get sum aggregation in the Load Script but without results. In the excel File appears the final results and What I want and my final Output.
This is my scritpt: Load well but appears another numbers in the field.
NoConcatenate
Temp_Can_lao2:
LOAD
Field1,
Date,
Name,
Sum( Distinct [Field 1]) as [Field 1]),
Country
Resident Temp_Can_lao1
Group By Field1,Date,Name,Country;
Drop Table Temp_Can_lao1;
Thanks!
Here is my script;
Temp_1:
LOAD
Branch,
FechayHora,
Nombre,
Tic,
Pais
FROM
[..\Qvd\MC\MCLAT.qvd] (qvd)
Where Date(FechayHora) >= '10/02/2018' And Date(FechayHora) < '11/02/2018';
Can post your entire load script? I'm a little confused, because it looks like you did a Resident load from Temp_2 in your reply above, but I don't see the load script for Temp_2.
If possible, can you also screenshot a preview of your table data?
This my script without resident and group by... Just the first table:
Temp_1:
LOAD
Branch,
FechayHora,
Nombre,
Tic,
Pais
FROM
[..\Qvd\MC\MCLAT.qvd] (qvd)
Where Date(FechayHora) >= '10/02/2018' And Date(FechayHora) < '11/02/2018';
Here I bring 10/02/2018... If I do a pivot table Sum(Tic) Gives 73.436.650.
If I do Sum (Distinct Tic)) Gives 850 (Correct Output)...
After this i want to group.
At what level is 850 correct ? at the Branch level?.. may be post some sample data with the expected outcome..
or may be try a left join?
Temp_1:
LOAD
Branch,
FechayHora,
Nombre,
Tic,
Pais
FROM
[..\Qvd\MC\MCLAT.qvd] (qvd)
Where Date(FechayHora) >= '10/02/2018' And Date(FechayHora) < '11/02/2018';
Left Join(Temp_1)
Load
Distinct
Branch,
Sum(Tic)
Resident Temp_1
Group By Branch
;