Forum Discussion

slounsbury's avatar
slounsbury
Helper II
8 years ago
Solved

Adding Calculated Column To Table From Another Table

I have created a calculated column (ART_FET) in a table (Time_Entry) and am needing to move that column into another table (v_rpt_service). The two columns dont have any similar column titles but they do have a ticket number column that is just named differently in each (SR_Service_RecID and TicketNbr). I am wantting to join the ART_FET column to the v_rpt_service table by referencing the SR_Service_RecID and TicketNbr.

 

Here is an example of what I am looking for, The column in bold is what I am wanting to move.

 

Time_Entry Table

SR_Service_RedIDART_FED    
12345611/5/17 7:30 PM    
12345611/6/17 7:30 PM    
12345611/7/17 7:30 PM    
98765411/8/17 7:30 PM    
98756411/9/17 7:30 PM    
98765411/10/17 7:30 PM    
v_rpt_service Table     
TicketNBREntered_ByTime_Start_UTCTime_End_UTCFirst_TimeART_FED
123456joe11/6/17 8:30 PM11/6/17 9:30 PM11/6/17 8:30 PM11/5/17 7:30 PM
123456bob11/7/17 10:30 PM11/7/17 11:00 PM11/6/17 8:30 PM11/6/17 7:30 PM
123456tim11/8/17 6:30 PM11/8/17 7:00 PM11/6/17 8:30 PM11/7/17 7:30 PM
987654bob12/6/17 6:30 PM12/6/17 7:00 PM12/6/17 6:30 PM11/8/17 7:30 PM
987564joe12/12/17 9:30 PM12/12/17 10:00 PM12/6/17 6:30 PM11/9/17 7:30 PM
987654tim1/11/18 6:30 PM1/11/17 7:00 PM12/6/17 6:30 PM11/10/17 7:30 PM

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Slounsbury

     

    1. In Retaionships Tab, define the  relationship between Time_Entry_Table[SR_Service_RedID] = v_rpt_Service_Table[TicketNBR]

     

    2. Now, create a new column using RELATE and use that measure in the v_rpt_Service_Table table.

     

    New_Art_Feed= RELATE ( Time_Entry_Table[ART_FED]).

     

    Hope this helps.

     

    Thanks
    Raj

    • slounsbury's avatar
      slounsbury
      Helper II

      Thank you for your reponse Anonymous

       

      When I try to build the relationship between these two columns I get an error stating that they must have unique values. Any ideas on what could be cuasing this? I created a new table to get rid of the null values in the Sr_Service_RecID column. The SR_Service_RecID column eventually gest to ticket 284464 but the tickets before that are not needed. Should I delete the tickets that dont have a match in the other column?