Forum Discussion

morther's avatar
morther
Icon for Helper I rankHelper I
9 years ago
Solved

Duplicate column to a related table

 

I have 2 tables, "Nodes" and "ImportCubicPMs"  They are joined from Device_ID to NodeName. 

 

In the table "ImportCubicPMs" there is a column "PM Count" which I would like to duplicate to the "Nodes" table.   I tried to create a column in the "Nodes" table using RELATED, but Intellisense does not show the "ImportCubicPNs" table to pull the column from.

 

PM = RELATED(ImportCubicPMs[PM Count])

 

I receive the error:  

“The column 'ImportCubicPMs[PM Count]' either doesn't exist or doesn't have a relationship to any table available in the current context.”

 

What am I doing wrong?

  • Hi morther,

     

    The RELATED function works on the Many side between the related tables. But you're creating the column on the One side(Nodes table), so it won't work here.

     

    In your scenario, you should be able to simply use the formula below to create a column in the "Nodes" to get "PM Count" from the table "ImportCubicPMs". :smileyhappy:

    PM = CALCULATE ( SUM ( ImportCubicPMs[PM Count] ) )
    

     

    Regards

2 Replies

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi morther,

     

    The RELATED function works on the Many side between the related tables. But you're creating the column on the One side(Nodes table), so it won't work here.

     

    In your scenario, you should be able to simply use the formula below to create a column in the "Nodes" to get "PM Count" from the table "ImportCubicPMs". :smileyhappy:

    PM = CALCULATE ( SUM ( ImportCubicPMs[PM Count] ) )
    

     

    Regards

    • morther's avatar
      morther
      Icon for Helper I rankHelper I

      That worked like a charm.  Thank you so much