Forum Discussion
Saqibmughal00
Helper I
2 years agoI wan to link multiple tables
I got a situation, got planned data at different sheet and actual at different sheet. both are linked to date table but I also want to link them based on "adjusted scope" as the slicers are based on ...
- 2 years ago
You can create a separate dimensions table to link the two tables just like you did with dates. You can do that either in the query editor or in DAX. In DAX, try this:
DimScope = VAR __FORCE = SELECTCOLUMNS ( 'Force Table', "Adjusted Scope", 'Force Table'[Adjusted Scope] ) VAR __PLANNED = SELECTCOLUMNS ( 'Planned', "Adjusted Scope", 'Planned'[Adjusted Scope] ) RETURN DISTINCT ( UNION ( __FORCE, __PLANNED ) )
Anonymous
2 years agoNot applicable
It looks like Adjusted scope is just a text field? I would suggest you need an adjusted scope table and join it to both tables, like you did with date.
The easiest way to do this would be in Power Query.
- New query using "Reference" to the query "Force Allocation Data..", remove other columns except for Adjusted Scope. Mark this query as "Enable load" False
- New query using "Reference" to the query "Planned", remove other columns except for Adjusted Scope. Mark this query as "Enable load" as False
- Append both into a single table. Use the "Remove Duplicates" to get a distinct list of Adjusted Scope. Import that table into your model
- Join both tables to your new adjusted scope table.
- Ma