cancel
Showing results for 
Search instead for 
Did you mean: 

Sum function retrieving duplicate rows. How to remove?

Former Member
0 Kudos

capture1.pngcapture3.pngWhen I directly drag and drop the object I am getting less value but when I create new cell with sum function for the same object, then I am getting wrong result

Accepted Solutions (0)

Answers (2)

Answers (2)

sateesh_kumar1
Active Contributor
0 Kudos

Hi Nithya ,

It appears your issue is because of calculation context .

Go through https://michaelwelter.wordpress.com/2011/07/31/removing-the-confusion-from-calculation-contexts/

Add required dimensions to the formula .

Regards

Sateesh

amitrathi239
Active Contributor
0 Kudos

This is happening because you have duplicate values.

Right click on the table->Format table->checked the checkbox "Avoid duplicate row aggregation" and you will get the total sum 13320.

to avoid this edit the webi query->Properties->uncheck the checkbox "retrieve duplicate rows" and see.

Former Member
0 Kudos

I have already tried your solutions.When I do this I am getting less value in DB and more value in Report.

The above object is Dimension. Is it necessary to make it as Measure?

amitrathi239
Active Contributor
0 Kudos

what is the total coming when you checked the option at webi table level?

what is the total coming when you are unchecking the checkbox at webi query level?

Former Member
0 Kudos

If I unchecked that option am getting 510 and when enabling that option am getting 13320

amitrathi239
Active Contributor
0 Kudos

what is the value in the database? if it's 510 then edit the webi query->Query properties and uncheck the option "retrieve duplicate rows" and see.

create the measure object and try.might be some values are not duplicate but because of same values these are appearing as duplicate.

Former Member
0 Kudos

In Database we have 510. So unchecked the "retrieve duplicate rows" and got correct data as per DB. but when I tried to sum those data in a individual cell then again I am getting wrong total 13320. I need to get 510 even in individual cell. If you refer my attachment I have used same formula but the result is different.

amitrathi239
Active Contributor
0 Kudos

have you unchecked from webi query?

Former Member
0 Kudos

Yes I unchecked this. Facing same issue