MDX - tuples or sets must use the same hierarchies in the function

MDX is totally different from SQL queries. MDX engine thrown back the error when I have given the below query .Here [Color] and [Size] belongs to the same dimension Dim Product.

Fig 1








This is very simple syntax issue. In MDX we should keep all the members of same dimension within the brackets ( ) as showed below.

Fig 2

Comments

  1. Thanks for the tip. I ran into the same problem today, thanks a lot!

    ReplyDelete
  2. Thanks for your help

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. In sql this sub query is like this
    (SELECT SUM(r$_profit_total) FROM V_RELATIONSHIPS WHERE
    (((V_RELATIONSHIPS.RF_Closed = '0')
    AND (V_RELATIONSHIPS.RA_Count_Services = 4)))
    and r_branch_id = br_id ) Profit,


    but in mdx i create this
    SUM(EXISTING{([Relationships Flags].[RF Closed].&[False],
    [Relationships Activity].[RA Count Services].&[4],[Relationships].[R Branch ID]=[Branch].[BR ID])},
    [Measures].[R_ Profit Total])

    but it shows error in profit column

    ReplyDelete
    Replies
    1. Can you please paste the error too here. also sample data.

      Delete
  5. a pride for me to be able to discuss on a quality website because I just learned to make an article on
    cara menggugurkan kandungan

    ReplyDelete
  6. TreasureBox is operated by a group of young, passionate, and ambitious people that are working diligently towards the same goal - make your every dollar count, as we believe you deserve something better.
    bedroom furniture nz
    pregnancy pillow nz
    chicken coops nz

    ReplyDelete
  7. Thanks dude. You saved my day.

    ReplyDelete
  8. I thank you for the information and articles you provided

    ReplyDelete
  9. thank you for the information provided, we are waiting for the next info

    ReplyDelete
  10. I Would like to thank you for this article. From this article I got more and more useful information. This is so helpful to me. Keep updating more articles.
    Ubs accounting
    Myob Singapore
    Best Accounting software Singapore

    `

    ReplyDelete

Post a Comment

Popular posts from this blog

Hadoop - Hive - Load data from csv/xls files

Microsoft BI Implementation - Cube back up and restore using XMLA command