Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

problems with sum

Hey everyone i have a problem , i am buliding a sales report,

once i am trying to sum the incomes coulmn for some reason its duplicates my incomes ?

anyone have suggetions what should i check?

28 Replies
Not applicable
Author

chechking

reddy-s
Master II
Master II

Hi Jhonatan,

The reply which i gave was for the first code snippet you posted.

The Calculation engine does the joins for you and you do not have to explicitly do them. Is there a specific reason for the Left joins?

An having a large Fact table will impact the performance of the report as well.

Looking at the code I believe that one of the joins is duplicating the entries and hence the double in the figures.

Not applicable
Author

maybe the key table?

reddy-s
Master II
Master II

Possibly yes!

Not applicable
Author

Hey Sunny ,

i haven't got any syn keys ,

so i am guessing there is no duplications....

you have any other ideas?

reddy-s
Master II
Master II

Hi Jhonatan,

The Duplicates which we are referring here is not duplication of fields, instead duplication of the same record in a table:

ex:

Customer     Product     Price

X                    A               100

X                    A               100

When you sum this up using a sum(Price): it would result in 200 because the record was duplicated .

Is this happening with your Fact table?

Not applicable
Author

Fact Table???

reddy-s
Master II
Master II

Hi Jhonatan,

Yeah, I mean the table in which the measure is existing.

Just check if any of the records are being duplicated in the tables.

It would be easy to check from the Data Model Viewer .

Not applicable
Author

o.k , thank you  , this my module viewer and i will check my fact table with , cust, sale key ,ivcost,totprice

my module viewer.PNG

reddy-s
Master II
Master II

Yeah, Check the number of rows in the tables by selecting the table header and check the data view in the preview provided. You might find a table with more number of rows than you expected.

If you are not able to figure it out this way, simple create a straight table with the dimensions in the Fact table and you can figure it out.