# Aggregation of line items for account

Hello everyone,

I haven't found a thread so far covering this subject and haven't really found a solution in the knowledge base either.

Say I have a only a file of line items (i.e. seperate entries to the account) to all P&L accounts and want to get the aggregation done via integrator.
How would I achieve this, since the aggregation function in the field transform aggregates accross columns but not accross lines, or am I just too blind to see it?

And I cannot use the "add" in cube load, just the "insert", because the provided files always contains all periods of the year. And they should always be overwritten.

Let's assume the data looks something like this:
 Period Account Cost center #Value 11.2017 43200000 10004000 -2000 11.2017 43200000 10004000 -500 11.2017 43200000 10005000 -60 11.2017 43200000 10005000 -40 11.2017 43400005 10004000 -1000 11.2017 43400005 10005000 -100

the intended result that should be written to the cube would be this:
 Period Account Cost center #Value 11.2017 43200000 10004000 -2500 11.2017 43200000 10005000 -100 11.2017 43400005 10004000 -1000 11.2017 43400005 10005000 -100

IMORTANT: Should be still applicable to Jedox 6.0 SR3

Thanks a lot in advance for any hints and help.

BR
Bjoern
Counterquestion:

What happens if you use your upper table as input of a TableAggregation and structure it like

Target
- Period
- Account
- Cost center

Measure
- Value / sum / numeric
if you clear the cube (all periods you are going to load) before you can use add

### holgrich wrote:

Counterquestion:

What happens if you use your upper table as input of a TableAggregation and structure it like

Target
- Period
- Account
- Cost center

Measure
- Value / sum / numeric

Sorry, I completely forgot to mark this one as solved.
Sometimes one cannot see the obvious solution . Thanks for your pointer holgrich. Of course it works with the table aggregation.

@jjunek: adding a job which cleares the cube slice first and then use add for the cube load, works as well but is a bit tedious for this case.
I would use this way for a cube load with drillthrough.