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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Need help: Matrix with two tables

Hello everybody!

I'm having trouble creating a matrix view using two different tables but with the same fields in the summary lines.

I have tables like these:

 

SALES:

SELLER IDSALE VALUE (R$)
120
130
150
250
240
250
3200
325
350

 

OVERTIMES:

SELLER IDOVERTIME (HOURS)
11
12
23
32
33
35

 

Both report different things, but share the same SELLER ID.

I would like to create a matrix to view both tables summarized, like this:

SELLER IDSUM OF SALE VALUE (R$)SUM OF OVERTIME (HOURS)
11003
21403
327510

 

However when I try to add values from a second table in the matrix, it looks like this:

SELLER IDSUM OF SALE VALUE (R$)SUM OF OVERTIME (HOURS)
110016
214016
327516

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@Anonymous,

 

This can be achieved with a star schema. Create a SELLERS table using Power Query or DAX. Here's a DAX calculated table:

 

SELLERS = 
DISTINCT (
    UNION ( DISTINCT ( SALES[SELLER ID] ), DISTINCT ( OVERTIMES[SELLER ID] ) )
)

 

Create relationships:

 

DataInsights_0-1649515283959.png

 

In the visual, use SELLERS[SELLER ID]:

 

DataInsights_1-1649515307578.png

 





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@Anonymous,

 

This can be achieved with a star schema. Create a SELLERS table using Power Query or DAX. Here's a DAX calculated table:

 

SELLERS = 
DISTINCT (
    UNION ( DISTINCT ( SALES[SELLER ID] ), DISTINCT ( OVERTIMES[SELLER ID] ) )
)

 

Create relationships:

 

DataInsights_0-1649515283959.png

 

In the visual, use SELLERS[SELLER ID]:

 

DataInsights_1-1649515307578.png

 





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

Proud to be a Super User!




Anonymous
Not applicable

Hi @DataInsights 

It worked like a charm. 

Thanks!

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 Solution Authors