The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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!
User | Count |
---|---|
82 | |
80 | |
35 | |
32 | |
32 |
User | Count |
---|---|
93 | |
79 | |
62 | |
54 | |
51 |