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
VistaDee
Frequent Visitor

LEFT JOIN creating Duplicate in SUM

So I was wondering if I could get some help withi this:

 

I have 2 seperate tables:

Projects
ProjectIDProjectNameProjectCost
123456Tilling Kitchen150
545454Painting Hallway100
125877Wallpapering Bedroom200
Jobs
JobIDJobProjectID
1Buy Grout123456
2Take Measurements123456
3Bought Paper125877

 

But because I need a table that shows projects whether they have a job or not, I set up a new Merged table as below:

 

AllProjectsAndJobs
ProjectIDProjectNameProjectCostJobIDJobProjectID
123456Tiles and Tubs1501Buy Grout123456
123456Tiles and Tubs1502Take Measurements123456
545454Paint and Brushes100   
125877Wallpaper and Glue2003Bought Paper125877

 

The problem I have is that because project 123456 has 2 jobs and I want a table to just show the Project and its costs, its duplicating the value for 123456 as it has 2 job entries:

 

PowerBI.jpg

 

How do I get around this? 

 

Thanks

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@VistaDee , You can create a join between these two assume projects has unique project only. 1-M join(No need to merge)

 

a measure like this should have give you projects with no jobs too

count(Jobs[ProjectID])+0

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@VistaDee , You can create a join between these two assume projects has unique project only. 1-M join(No need to merge)

 

a measure like this should have give you projects with no jobs too

count(Jobs[ProjectID])+0

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.

Top Solution Authors