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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PietroFarias
Resolver II
Resolver II

How to include another measure from an unrelated table

I need to adjust the measurement below: TotalValue.

sampleMeasure.png

TotalValue = SUM (Table1 [VALUE])
 
TotalAdjust = SUM (Table1 [VALUE])

 

This file was not modeled correctly. There should be a table with the categories to be able to easily solve the case, and it has already been done.

 

But I would like to know, if I did not create the dCATEGORY table, how would I be able to return the values of the adjustments that originate from Table2 into the TotalValue measure?

6 REPLIES 6
Anonymous
Not applicable

Hi @PietroFarias,

It seems like your relationship is based on date field that can't map two table records correctly. For this scenario, I'd like to suggest you take a look at the following link to create a bridge table to link the table with multiple columns.

Relationship in Power BI with Multiple Columns 

Regards,

Xiaoxin Sheng

MarcoPessina
Resolver IV
Resolver IV

Hi,

you can try to use TREATAS function and write this measure:

 

Total value = CALCULATE (
SUM(Table1[Value])+SUM(Table2[Value]),
TREATAS (
VALUES (Table1[Category]),
Table2[Category]
)
)
 
Hope it helps.
Marco
 

I tried other ways that return something like TREATAS and the result was the same. If you notice in the total of TREATAS the value is different because it does not return within the period of the calendar. But return in TOTAL.

 

Screenshot_8.png

@PietroFarias , Prefer to have common Category dimension

new table
Category = distinct(union(all(Table1 [Category]),all(Table1 [Category])))

And you measure shouuld belike this

Final Value =[TotalValue]-[TotalAdjust]

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak I created the dimensional table to relate both tables.My idea in this post, is more of an educational proposal, to understand how DAX works in a situation like this.

@PietroFarias , Hope you got the answer. Or do you need more input

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.