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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Christoph1972
Regular Visitor

How to get sum by group and related table?

I have two tables:

Table Jobs:

ID; Name; TaskID
1; Job1; 1
2; Job1 ;3
3; Job1; 3
4; Job2; 2
5; Job2; 3
6; Job2; 3
7; Job3; 1
8; Job4; 2
9; Job4; 1

 

and a table with costs for a specific task.

Table Task:

ID; Name; €
1; Cleaning; 5
2; Testing; 10
3; Replacing; 20

 

I created a relation between Jobs.TaskID and Task.ID. How to get the sum (€) of tasks of a job? I like to get the following output:

Job1; 45
Job2; 50
Job3; 5
Job4; 15

 

I got only the following output:

 

Christoph1972_0-1671455145733.png

That’s quite different as expected. Any ideas how to get the sum (€) of each job?

Kind regards
Christoph

1 ACCEPTED SOLUTION
Christoph1972
Regular Visitor

The Power Query Editor served exactly what I needed. Go to Combine and create the relation there.

 

Christoph1972_0-1671460218568.png

Then the model shows exactly what I need:

Christoph1972_1-1671460218568.png

 

Thanks a lot! 😊

 

View solution in original post

3 REPLIES 3
Christoph1972
Regular Visitor

The Power Query Editor served exactly what I needed. Go to Combine and create the relation there.

 

Christoph1972_0-1671460218568.png

Then the model shows exactly what I need:

Christoph1972_1-1671460218568.png

 

Thanks a lot! 😊

 

FreemanZ
Super User
Super User

Hi @Christoph1972 

try to

1) remove the TaskID from the table visual. 

2) Jobs Table and Task Table shall be related one-to-many. Is that the case?

Thanks for your reply!

Removing the TaskID doesn't fix it.

Yes, related one-to-many is correct.


Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors