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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
LiNSiCKeL
New Member

Linking Two Tables with Multiple Entries

As I understand this is a relationship problem, but I am unsure how to properly link these items to get it to function correctly. 

 

Both tables have many projects each having their own set of activities. 

 

Table 1 - Has activity budgets, many lines for a single project. A single line for each activity. 

LiNSiCKeL_0-1765206511601.png

 

Table 2 - Has entries against those same activities for time, will have multiple entries for each activity

LiNSiCKeL_1-1765206571099.png

 

Problem I have is the budget does not come through correctly, I get this. Desire to have each budget displayed instead of min, max, average. Can't get it to display the seperate values. 

LiNSiCKeL_2-1765206721623.png

 

 

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

In Power Query, create a table witha single column of all unique activities.  Create a Many to One relationship from the 2 existing tables to this third table.  To your visual, drag Activity from the 3rd table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @LiNSiCKeL,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @AntoineW@FBergamaschi and @Ashish_Mathur for the prompt response. 

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

FBergamaschi
Solution Sage
Solution Sage

You need to create a data model

 

Create a Projects and an activities Table

Projects = 
DISTINCT
UNION (
ALLNOBLANKROW ( Table1[project] ),
ALLNOBLANKROW ( Table2[project] )
)

 

Activities = 

DISTINCT
UNION (
ALLNOBLANKROW ( Table1[Activity] ),
ALLNOBLANKROW ( Table2[Activity] )
)

 

Connect each of them one to many to your Table 1 and Table 2

 

Define two measures

 

Budget = SUM ( Table2 [Budget Labor Hours]

Actual = SUM ( Table1 [Hours] )

 

and drop both of them into the values section of the matrix

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

 

@FBergamaschi 

 

Not quite getting it to work. 

 

The actual is now a sum of all activities not each one. 

LiNSiCKeL_0-1765216682968.png

LiNSiCKeL_1-1765216717097.png

 

I am not sure where the two measures should have been made, or how the actual measure would sum up each activity? I feel more needs to be done there? 

 

AntoineW
Memorable Member
Memorable Member

Hi @LiNSiCKeL,

 

On the model page, make sure you have a unique value on a table.

You have a single line for each activity on table 1 and link to field "Activity" of the table.

 

The relation between will be 1-to-many(*) and it should work ! 

One way to optimize that is to have a dimension table of unique value of Activity and a fact table that contains all records.

 

Hope it can help you!

Best regards,

Antoine 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors