5 Replies Latest reply on Sep 13, 2018 3:36 AM by Vijay Oswalia

# Rounding issue occurring while dividing the values

Hello,

My issue is that when I do " [2018 weightage]-[2017 weightage ]/ [2017 weightage]" then all my values get rounded upto -1 but "[2018 weightage]-[2017 weightage]" gives the correct  result.I have Views of years 2018 & 2017 then I have calculate the weightage of each view with respect to the sum of all views of that year. Now when I am trying to find the progress from 2017 to 2018 using " [2018 weightage]-[2017 weightage ]/ [2017 weightage]", it is giving me only -1.00 instead of -.7/6 something. I have attached the workbook.

Thanks and greets,

Vijay

Message was edited by: Vijay Oswalia

• ###### 1. Re: Rounding issue occurring while dividing the values

hi Vijay,

So if we break down one of the rows

[2018 wieghtage]/[2017 weightage]-1

So this is 0/0.125 = 0

Then 0-1 = -1

Why do you have the -1? It looks like the weightage calculation returns a percentage, and traditionally you show differences of percentages by taking one from the other, and not the percentage change of a percentage.

Hope that helps

If you let me know the result you expect for the row example I've used I can take a look.

• ###### 2. Re: Rounding issue occurring while dividing the values

I don't find anything wrong in the calculation,

Its generating the correct result. Take the underlying values which generating the result

Mahfooj

• ###### 3. Re: Rounding issue occurring while dividing the values

Hi @Simon/@Mahfooj

SO the data that was in the workbook was only the sample and by chance all the values it were that states the calculation as correct. Here is the screenshot of the issue.

I am re-attaching the workbook again. Sorry for the blunder

• ###### 4. Re: Rounding issue occurring while dividing the values

Ah...I see

So you just need to aggregate it at the level you want to calculate

SUM([2018 weightage])-SUM([2017 weightage])/

SUM([2017 weightage])

If you look at your 2017 and 2018 weightage...they are both wrapped in SUM so you need to reflect this in the variance calculation

• ###### 5. Re: Rounding issue occurring while dividing the values

Thanks Simon, its working now.