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.
Rupak_bi
1 year agoSuper User
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.
MarkoG
1 year agoNew Member
Great, this works perfectly. Thank you for the detailed pictures and explanaition