none
what can cause a value to be negative in the cube but is positive in the underlying db RRS feed

  • 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. 

    Friday, September 13, 2019 10:08 PM

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 Tabclip_image002
    • 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.

    Saturday, September 14, 2019 2:33 PM
  • 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.

    Monday, September 16, 2019 2:25 AM
  • 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.
    Monday, September 16, 2019 12:23 PM
  • is a base value
    Monday, September 16, 2019 12:24 PM
  • 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.

    Tuesday, September 17, 2019 7:11 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.

    Monday, September 23, 2019 8:36 AM