Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
PabloOrtiz
Partner - Creator
Partner - Creator

Problem with simple Aggr

Hello, the situation is as follows:

Captura.JPG

I have a data table "Datos" and i need to get a table like this "Coste Servicio / Contrato"

This would be added by "Contrato" and get a table like this

C1   S1  5000  8000

C1   S2  1000  8000

C1   S3  2000  8000

C2   S1  1000  3000

C2   S2  2000  3000

I am using the following expression "sum(Aggr(sum(Coste), Contrato))" for "CosteContrato" but I can not get the same value in each row of "Contrato"

I attach an example.

Thenks.

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

If you want to use the sum within each "Contrato" you should use

  sum(Total <Contrato> Coste)

HIC

View solution in original post

7 Replies
asgardd2
Creator III
Creator III

Add NoDistinct:

sum(Aggr(Nodistinct sum(Coste), Contrato))

stabben23
Partner - Master
Partner - Master

Hi,

you need to aggr on all Dimensions, like sum(Aggr(sum(Coste), Contrato, Servicio))

Sorry, to fast answer, se above!

Chanty4u
MVP
MVP

try

=Agg(sum(Total Coste),Contrato)

vikasmahajan

Why you want aggr in this case simply sum() will give you result.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
hic
Former Employee
Former Employee

If you want to use the sum within each "Contrato" you should use

  sum(Total <Contrato> Coste)

HIC

kkkumar82
Specialist III
Specialist III

Hi use,

Like Sum(Total <Contrato> Coste)

it will give you the totals of the first dimension.

PFA

Kiran Kumar

PabloOrtiz
Partner - Creator
Partner - Creator
Author

Thanks Henric, it works perfectly.