cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
bo_afk Member
Member

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

Accepted Solutions
Community Support Team
Community Support Team

Re: How to reference columns from another table

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
Community Support Team
Community Support Team

Re: How to reference columns from another table

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

bo_afk Member
Member

Re: How to reference columns from another table

This worked perfectly. Thanks!

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 287 members 2,972 guests
Please welcome our newest community members: