Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with the movements that occur daily (Office, Product, Date, Amount) and I want to get a table with the following contents:
Office, Product, year, month, Accumulated amount.
The accumulated amount is always from the start to the month in question.
What would be the quickest and most efficient way to get it?
TX
Data:
LOAD
Empresa,
Cta_Cod,
Year,
Month,
Tmonth
FROM
qv969213.xlsx
(ooxml, embedded labels, table is Hoja1);
Load
Empresa,
Cta_Cod,
Year,
Month,
Tmonth,
If(RowNo() = 1, Tmonth, If(Cta_Cod = Previous(Cta_Cod),RangeSum(Peek('Accumulated'),Tmonth),Tmonth)) as Accumulated
Resident Data
Order By Cta_Cod, Year, Month;
Drop Table Data;
Thank you very much for your help.
I have still a detail to be resolved.
I would like to have a record for each set Cta_Cod, Year, Month, even though there are no movements of the months.
Check this..
Perfect.
Thank's
MUCHAS GRACIAS.
Saludos,
Enrique Colomer