Forum Discussion
MarkoG
1 year agoNew Member
Combine data from 2 tables with different headers
Dear all, Is it possible to combine data from 2 below tables: I would like to compare "First Class" data from both tables, but as you can see the dates are in headers in table2. I can...
- 1 year ago
Hi MarkoG ,
Here is your Solution.
1. First unpivot Table 2 all the date columns in query editor as shown below.
2. Now after loading, go to table section, open table 2 and change data type of attribute to date.
3. Now go to table 1 and insert new column and use below dax to lookup
Data from Table 2 = LOOKUPVALUE('Table 2'[Value],'Table 2'[Mod],'Table 1'[Mod],'Table 2'[Sta],'Table 1'[STA],'Table 2'[Attribute],'Table 1'[Date])If this works, please accept as solution.
ryan_mayu
1 year agoSuper User
you can select the first 3 column in table 2 and unpivot other tables
then in table 1 and you use merge query function
press ctrl and choose columns , you can see number beside the column headers. Make sure the sequences are matching.
then expand the column
pls see the attachment below
MarkoG
1 year agoNew Member
Thank you for the help, but the other post resolved my issue in a better way. Thank you again