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. 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
  6. Thanks dude. You saved my day.

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

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

    ReplyDelete
  9. THANK YOU for this amazing and for sharing this blog with us, it is very helpful.
    please keep updated us more about like this type of blog.
    If someone is looking for the best java training institute for software training in Ghaziabad, java training institute
    It is the best place from where you get the practical knowledge of java training institute here. You will be an expert in this field after doing the java training.

    ReplyDelete

Post a Comment

Popular posts from this blog

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

Databricks - incorrect header check