Asked by:
what can cause a value to be negative in the cube but is positive in the underlying db

Question
-
I have a fact table that has values
A dim table that has "accounts" linked to fact table via an account id
If I sum the value up in the fact for the account id
select sum(f.value) as value, f.version, d.account_ucm_key, d.account_ucm_name
from fact_financials f
inner join dim_Account_UCM d on f.Account_UCM_id=d.account_ucm_id
where f.Account_UCM_id='OPSPRODLABREG'
and f.Scenario='AugFcst'
group by f.version,d.account_ucm_key, d.account_ucm_name
but in the cube it appears like
the dim is a regular dim not type of Account.
All replies
-
Hi
This might be due to the data type that is used within the cube is too small for your value.
So what happens is that it is an overflow and displays this with a negative sign at the start “-“
- Please follow below steps to get out of this issue.
- Open your cube where you are getting this error and Click on the Cube Structure Tab
- Right click on your measure that is having the issue and click on Properties
Now in the Properties click on the plus sign next to Source
Where it says DataType change this to a bigger value
Example: Our data type was INT which was not big enough for the sum of our values, so once this was changed to a BigInt it went away.
Hope this is helpful !!
Thank you
If this post helps to resolve your issue, please click the "Mark as Answer" of that post and/or click Answered "Vote as helpful" button of that post. By marking a post as Answered and/or Helpful, you help others find the answer faster.
-
Hi Anonymous,
Thanks for your post.
Is the column "Financial-Value" calculated measure, or just base measure? If yes, you need to check the mdx expression of that measure in the tab "calculations" of cube.
Best Regards,
Will
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com. -
My data type is a double which can hold values of
A floating-point number within the range of -1.79769313486232E +308 to 1.79769313486232E +308. A Double value stores number information up to 15 decimal digits of precision
So I don't think I'm overflowing the data type.
A floating-point number within the range of -1.79769313486232E +308 to 1.79769313486232E +308. A Double value stores number information up to 15 decimal digits of precision. A floating-point number within the range of -1.79769313486232E +308 to 1.79769313486232E +308. A Double value stores number information up to 15 decimal digits of precision. -
-
is a base value
OK. Have you applied that base measure to the scope statement in the tab "calculations" of cube?
Best Regards,
Will
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- Proposed as answer by Will_KongMicrosoft contingent staff Thursday, September 19, 2019 10:17 AM
-
Hi Anonymouse123sdaf,
Does it solve your issue? I need your confirmation.
Best Regards,
Will
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.