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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bo_afk
Post Patron
Post Patron

How to reference columns from another table

I have my main order table split by month, year and day. The month values are full month names. I've created another table with the shortened names and joined these two together.

 

Month

MonthOrderMonthShort

January

1Jan
February2Feb
March3Mar
April4Apr
May5May
June6Jun
July7Jul
August8Aug
September9Sep
October10Oct
November11Nov
December12Dec

 

I would like to get a "Day-month" column in my main table by combining the day number and the MonthShort value (e.g. 1-Jan, 2-Jan etc), but this column is from a different table and I can't seem to do this. 

 

Does anyone have any ideas?

 

Thanks

afk

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @bo_afk 

For your case, you could get it by these simple ways:

1. you could use RELATED Function to careate a column as below:

Day-month = 'order'[Day] &"-"&RELATED('Month'[MonthShort])

2. you could use LOOKUPVALUE Function to careate a column as below:

Day-month 2 = 'order'[Day] &"-"&LOOKUPVALUE('Month'[MonthShort],'Month'[MonthOrder],'order'[Month])

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @bo_afk 

For your case, you could get it by these simple ways:

1. you could use RELATED Function to careate a column as below:

Day-month = 'order'[Day] &"-"&RELATED('Month'[MonthShort])

2. you could use LOOKUPVALUE Function to careate a column as below:

Day-month 2 = 'order'[Day] &"-"&LOOKUPVALUE('Month'[MonthShort],'Month'[MonthOrder],'order'[Month])

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This worked perfectly. Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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