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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ragnargylfa
Frequent Visitor

Joining two tables (left outer join), one is from source other is created with summarize.

Good day,

 

I have a table from a source which lists a cost for projects.

i.e.

Job  Cost

A     1

A     3

B     6

C     1

A      2

 

I have created a new table using summarize which gives me total cost for each job

Job Cost

A    6

B    6

C    1

 

I have a third table that contains estimated cost of jobs (not all though)

Job Est

A     8

C     7

 

How can I create the final table that would look like this?

Job Cost Est

A     6      8

B     6     

C     1      7

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

@ragnargylfa

 

Hi

 

In your scenario, the column “job” in the table “estimated cost” should be unique. Please try this formula.

FinalTable =
ADDCOLUMNS (
    SUMMARIZE (
        'CostOfProjects',
        'CostOfProjects'[Job],
        "CostofProjects", SUM ( 'CostOfProjects'[Cost] )
    ),
    "Est", LOOKUPVALUE ( 'EstimatedCost'[Est], EstimatedCost[Job], 'CostOfProjects'[Job] )
)

Joining two tables (left outer join), one is from source other is created with summarize.JPG

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

 

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiascu-msft
Employee
Employee

@ragnargylfa

 

Hi

 

In your scenario, the column “job” in the table “estimated cost” should be unique. Please try this formula.

FinalTable =
ADDCOLUMNS (
    SUMMARIZE (
        'CostOfProjects',
        'CostOfProjects'[Job],
        "CostofProjects", SUM ( 'CostOfProjects'[Cost] )
    ),
    "Est", LOOKUPVALUE ( 'EstimatedCost'[Est], EstimatedCost[Job], 'CostOfProjects'[Job] )
)

Joining two tables (left outer join), one is from source other is created with summarize.JPG

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

 

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks!

 

This worked for me 🙂

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.