locked
How to make multiple key relation RRS feed

  • Question

  • Hi all i want to make a multiple key relation in Powerpivot

    lets say i have

    tbl1   ( F1 , F2 , F3 ,F4)   and F1 and F2 are both a PK in the table

    tbl2   ( F1 , F2 , F20 ,F21)   and F1 and F2 are both a FK in the table

    how can i make a relation in between the 2 tables on the F1 and F2 fields

    i am looking for a demo, film ,blog, etc....

    sincerely

    sh


    Sincerely SH --MCTS 2005 & 2008 MCITP 2008 -- Please kindly mark the post(s) that answered your question and/or vote for the post(s)
    Thursday, June 10, 2010 3:47 PM

Answers

  • Create a calculated column in both tables by concatenating the two fields (I suggest to place a separator between two fields) and then create the relationship through the calculated column.

    Marco


    Marco Russo
    Thursday, June 10, 2010 5:13 PM

All replies

  • Create a calculated column in both tables by concatenating the two fields (I suggest to place a separator between two fields) and then create the relationship through the calculated column.

    Marco


    Marco Russo
    Thursday, June 10, 2010 5:13 PM
  • So basically you are say that i should CONCAT the 2 fields Like =A1 & " - " B1 and do that for the second table

    and link that into the 2nd table.

    sh


    Sincerely SH --MCTS 2005 & 2008 MCITP 2008 -- Please kindly mark the post(s) that answered your question and/or vote for the post(s)
    Thursday, June 10, 2010 8:19 PM
  • Yes, exactly!


    Marco Russo
    Thursday, June 10, 2010 8:40 PM
  • I was in a Event and the presenter manetioned that you can to this by making functions, or something like that , i don't remeber , my question is do you know another way? is it possible to find another way?

    when i watch the demo film and Video on powerPoint they always say "making a relation between tables and KEYS" Keys are PK &  FK and a PK &  FK  can be complex key, i don;t know?

    maybe we will be seeing this in the next version of PowerPivot!

     


    Sincerely SH --MCTS 2005 & 2008 MCITP 2008 -- Please kindly mark the post(s) that answered your question and/or vote for the post(s)
    Thursday, June 10, 2010 8:53 PM
  • Yes, but this is the way to go: you can use CONCATENATE or the & operator, but you have to store the result into a calculated column.

     


    Marco Russo
    Thursday, June 10, 2010 9:14 PM