c# - Preventing overflow on agreggated measures -


according links below, there issue ssas produces silent overflowing on agreggated measures:

http://gqbi.wordpress.com/2013/08/14/ssas-getting-a-negative-value-for-measure-that-has-been-used-in-a-sum/

http://social.msdn.microsoft.com/forums/sqlserver/en-us/01dc2413-e2f8-4d40-88fa-2faeb4f5dd1b/

is there way preventing programmatically changing source's datatype according measure's aggregationfunction property? intention "shift" types greater type when required. is, want know whether need perform change every aggregationfunction or not.

thank you

there no automatism anywhere prevent this. have know if maximum value can result aggregation may bigger data type using allows, e. g. if use smallint, if aggregated values between -2^15 (-32,768) , 2^15-1 (32,767), or between -2^31 (-2,147,483,648) , 2^31-1 (2,147,483,647) integer. data types have restrictions.

in case of used aggregation sum, simple case if have positive or 0 values input. in case, sum values using larger data type, check if sum fits type. in case have positive , negative values, situation more complex: have separately sum positive , negative numbers in order see if sum may below minimum or above maximum value.

and other aggregations, situation differ.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -