cancel
Showing results for 
Search instead for 
Did you mean: 

How round funtion work in hana calculation view

DoanManhQuynh
Active Contributor
0 Kudos

Hello everyone.

I facing an issue where idk why it happened, please help.

So I have an calculated column with bellow simple formal to calculate percentage:

Round(column A / column B * 100,1)

Note: Column A & B and result column all are decimal 17, 2

after consume in either Webi report and excel I got 0.1 difference between calculated value from hana view and calculated vaule from excel.

Example:

column A = 88152.70

column B = 1507369.12

Hana view's result = 5.9

Excel result = 5.8

Result without rounding (in excel) i got is:

0.058481163525494 

so if we do simple mathematic it should be 5.9 in my opinion...

pfefferf
Active Contributor
0 Kudos

You wrote that the HANA view result is 5.9 which is the correct one according to your opinion. So you are asking why Excel produces 5.8 as result?

Can you show the expression for the calculated column and your excel formula (in my simple trial example I get 5.9 in Excel too).

DoanManhQuynh
Active Contributor
0 Kudos

florian.pfeffer

My expression is simple like that:

round(if("APR_DEN"!=0,"APR_NUM"/"APR_DEN",0)*100,2)

Yes, my question is why excel produces 5.8. In excel i didnt do any complex calculation, just use above value and simply

round(cell A / cell B * 100, 1)

im asking because, i consume hana view in webi report then export to excel. in hana view result column is decimal 17, 2 but in webi its need to shown with 1 decimal point so in webi if I set number format to #,##0.0 result be come 5.9, but if i do the same calculate in excel it become 5.8.please see my attachment.

FYI, Im using office 365, BI 4.2 and hana 1.12.

former_member821734
Discoverer
0 Kudos

Hi,

Did you get the solution on this. If yes, can you please let us know. We are facing this same issue.

we tried many ways but not resolved yet.

Thanks.

Accepted Solutions (0)

Answers (0)