cancel
Showing results for 
Search instead for 
Did you mean: 

Arithmetic Over Flow in Analytical View

Former Member
0 Kudos

Hi Guys,

I have a numeric column in a table that i used in analytical view, which is decimal (14,14 ) . When I use it in Analytical view, It gives me "Arithmetic overflow in numeric calculation; $function$=mergeLoop; $message$=aggregation failed N_ABRMENGE$sum$ 1 fixed0.14(14)" error. After that I created a calculated attribute and i used DECIMAL, FLOAT, DECFLOAT conversion functions to solve the error. But nothing changed.

Do you have any idea how to get rid of it ?

Sincerely,

Yakup

Accepted Solutions (1)

Accepted Solutions (1)

former_member210482
Active Participant
0 Kudos

Hi yakup,

It is because when aggregation is taking place on this column the value is exceeding more than column size. Try increasing 14,14 to Higher values. Like ex 16,14 or 20,14. Hope this helps

Regards,

Safiyu

Former Member
0 Kudos

Hi Safiyudeen,

It didn't work unfortunately.

Regards,

Yakup

former_member210482
Active Participant
0 Kudos

Hi Yakup,

OK let's find out the maximum size of the column possible. Typecast your output to string and perform a string len function on it. Then again take the max of it.. So youll have a clear picture on what datatype should b used.

Regards,

Safiyu

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Safiyudeen,

I created variable like this and give me this error. If I click "calculate before aggregation". It works correctly.

"

Error: [314]: numeric overflow: search table error:  [6944] Error executing physical plan: exception 6944:

AttributeEngine/Parallel/Aggregators/SumAggregator.hpp:149

AttributeEngine: overflow in numeric calculation; $function$=mergeLoop; $message$=aggregation failed N_ABRMENGE$sum$ 1 fixed0.14(14)

,in executor::Executor in cube: _SYS_BIC:YARSLAN/ISU_GENERAL_BILLING/olap"

former_member210482
Active Participant
0 Kudos

Hi Yakub,

Decimal can take precision upto 38. But there are only slight chances it exceeds this limit. What is the actual data type of N_ABRMENGE?

Regards,

Safiyu

Former Member
0 Kudos

It is DECIMAL(14,14) . Sum of this measure is 9 precision. So it is not bigger than DECIMAL(30,14)

lbreddemann
Active Contributor
0 Kudos

Hey Yakup,

please try and check if

      fixed ( "N_ABRMENGE", 30, 14)

as a formula fixes the issue.

- Lars

Former Member
0 Kudos

Hi Guys,

I increased the length of calculated attribute, it worked when I select "calculate before aggreagation.". But the query execution time increased , I couln't find any further solution without selecting "calculate before aggreagation".

former_member210482
Active Participant
0 Kudos

Hi Yakup,

So after calculation it will aggregate right. If the issue is due to your field data type it should throw error again right. Can you share the detail error? Also your calculation..

Regards,

Safiyu

Former Member
0 Kudos

Hi Yakup,

As Safiy mentioned, when you reach the maximum limit of the datatype on column N_ABRMENGE then you will see this error .

Altering the column data type to higher limit would solve that issue, if not try this conversion function TO_DOUBLE ( N_ABRMENGE ) in your calculated attribute before Aggregation.

Thanks

Siva