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.
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 | MonthOrder | MonthShort |
January | 1 | Jan |
February | 2 | Feb |
March | 3 | Mar |
April | 4 | Apr |
May | 5 | May |
June | 6 | Jun |
July | 7 | Jul |
August | 8 | Aug |
September | 9 | Sep |
October | 10 | Oct |
November | 11 | Nov |
December | 12 | Dec |
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
Solved! Go to Solution.
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
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
This worked perfectly. Thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |