0 Replies Latest reply: May 21, 2012 1:29 PM by Srikanth P RSS

    Calulated Dimension for n-n relation

    Srikanth P

      Hi All,

       

      I had a problem with calculated dimension and it gone to virtual out of memory error.

       

      Please find the below is the relation between my keys.

       

      Key_X --> Key_Y --> Key_Z --> Key_A --> Key_B --> Key_C --> Key_D

       

      My data model is Start Schma and these Keys are the Keys in my Fact Table. These Keys have n-n Relation.

       

      The Key_C tied to anothe field in the dimesion table, Context_C and Context_C_Type. Context_C have the field values of Key_X or Key_Y or Key_Z. and Context_C_Type have the filed Name.

       

      When user select Key_C, I need to show the values matching Context_C with  Key_X or Key_Y or Key_Z. Please find the below Sample Data.

       

      FACT TABLE SAMPLE DATA:

      Key_XKey_YKey_ZKey_AKey_BKey_CKey_D
      abcdefg
      tyudopK
      wedfrgdofskj

       

      Key_C Dimension Table Data:

       

      Key_CContext_CContext_C_Type
      faKey_X
      ptKey_Y
      fsrgKey_Z

       

      When User select the value "f" in the Key_C, I want see only first row only because the Context_C value is "a" and Type is Key_X.

       

      So I wrote, Calulated dimension for this:

       

      =if(Context_C_Type='Key_X',if(Context_C=Key_X,Key_A)

      ,if(Context_C_Type='Key_Y',if(Context_C=Context_C,Key_A)

      ,if(Context_C_Type='Key_Z',if(Context_C=Context_C,Key_A))))

       

      It works for some values only and it gave very bad performance.

       

      Please give suggestions how to achive this and Can i achive this in the script?

       

       

      Thanks & Regards,

      Siri