Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Saqibmughal00
Regular Visitor

I 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 that. Shall appreciate your support on that. attaching screenshot below for reference. Force allocation data is actual file while planned is plan file and both have common adjusted scope. An i am keen on one to many relation (not sure if others will work as never tried).

 

Saqibmughal00_0-1711510858633.png

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @Saqibmughal00 

 

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 ) )









Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @Saqibmughal00 

 

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 ) )









Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thanks, Thats what exactly I did and it sorted the problem

RossEdwards
Solution Specialist
Solution Specialist

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.

  1. New query using "Reference" to the query "Force Allocation Data..", remove other columns except for Adjusted Scope.  Mark this query as "Enable load" False
  2. New query using "Reference" to the query "Planned", remove other columns except for Adjusted Scope.  Mark this query as "Enable load" as False
  3. Append both into a single table.  Use the "Remove Duplicates" to get a distinct list of Adjusted Scope.  Import that table into your model
  4. Join both tables to your new adjusted scope table.
  5. Ma

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.