Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
slounsbury
Helper II
Helper II

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

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Slounsbury

 

Noticed that you have many to many relationship between these tables. You may need to consider creating bridge table/ relationship table , which is explained in the below URL:

 

https://community.powerbi.com/t5/Report-Server/Many-to-Many-Relationship-between-tables-and-show-dat...

 

Hope this helps.

 

Thanks

Raj

View solution in original post

3 REPLIES 3
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

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?

Capture.PNG

 

 

 

Anonymous
Not applicable

Hi Slounsbury

 

Noticed that you have many to many relationship between these tables. You may need to consider creating bridge table/ relationship table , which is explained in the below URL:

 

https://community.powerbi.com/t5/Report-Server/Many-to-Many-Relationship-between-tables-and-show-dat...

 

Hope this helps.

 

Thanks

Raj

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.