+ Reply to Thread
Results 1 to 6 of 6

SUM( ) with multiple CUBEVALUE( )'s issue

Hybrid View

  1. #1
    Registered User
    Join Date
    10-11-2013
    Location
    Malta
    MS-Off Ver
    2013
    Posts
    3

    SUM( ) with multiple CUBEVALUE( )'s issue

    HI.

    I'm trying to do a SUM of two CUBEVALUE's in a Cell and i am Getting a #VALUE result every time one of them returns a #VALUE. I've tried encapsulating the individual CUBEVALUE in a IFERROR(..,0) but that doesn't work. It is like excel is not recognizing the "0" value of the IFERROR(..,0). The cell is set as a number format as well.

    Here is an example:

    =
    SUM(
    IFERROR(CUBEVALUE("ThisWorkbookDataModel","[Measures].[Sum of Amount]",...filters),0)
    ,
    IFERROR(CUBEVALUE("ThisWorkbookDataModel","[Measures].[Sum of Amount]",...diff filters),0)
    )

    .. and one returns #VALUE

    Any ideas?

    Thanks

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: SUM( ) with multiple CUBEVALUE( )'s issue

    Without seeing a sample of your work, the only thing I can think of that overrides the IFERROR is if your formula pulls back a string.

    String + anything = #VALUE.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: SUM( ) with multiple CUBEVALUE( )'s issue

    The SUM function should be after IFERROR not before
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    10-11-2013
    Location
    Malta
    MS-Off Ver
    2013
    Posts
    3

    Re: SUM( ) with multiple CUBEVALUE( )'s issue

    Hi Both,

    I tried putting iserror in front of the sum which returns 0 - now this is "presentable" but the summing should not be 0. hence my question

    What i can't understand is why the return value works when both cubevalues return a non-zero value, but when one does not - it doesn't work. I guess what daffodil11 is suggesting has something to do with it but that is why i put and IFERROR for each cubevalue (so it returns 0)..

  5. #5
    Registered User
    Join Date
    10-11-2013
    Location
    Malta
    MS-Off Ver
    2013
    Posts
    3

    Re: SUM( ) with multiple CUBEVALUE( )'s issue

    Ok Found a "Solution". I guess CUBEVALUE sends "no data" so it actually is not an error. So i had to use IF Function within the Measure when using PowerPivot's "Calculated Fields"

    So a calculated field for Sum of Revenue would be
    =IF(SUM([Revenue Amount])=0,0,SUM([Revenue Amount]))

    There may be better/efficient way but did the trick

    Thanks!

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: SUM( ) with multiple CUBEVALUE( )'s issue

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] CUBEVALUE Function - Excel 2007
    By Kresimir Zoric in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2013, 11:50 AM
  2. CubeValue - Multiple Fields
    By gsmcconville in forum Excel General
    Replies: 2
    Last Post: 03-15-2013, 11:45 AM
  3. [SOLVED] Excluding Single Member from CUBEVALUE using Curly Brackets
    By tlafferty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2012, 05:58 PM
  4. Using Wildcard in Cubevalue function
    By mashley in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-01-2011, 09:37 AM
  5. CUBEVALUE function
    By qinyg in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-21-2011, 11:26 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1