Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
There are 2 tables in this particular case and they have an inactive 1-m relationship. (because the data model are more complicated, cannot make the relationship active)
The fact table looks like this:
The dimention table(Business Unit) is like this:
I want to add BU_name into the fact table accordingly, and I use:
CALCULATE(LASTNONBLANK(BusinessUnit[BU_name],BusinessUnit[BU_name]),USERELATIONSHIP(Fact_table[BU_id],BusinessUnit[BU_id]))
Solved! Go to Solution.
Hi @Gabiiiii ,
Create a column as below:-
Column =
CALCULATE (
LASTNONBLANK ( Dim[BU_name], Dim[BU_name] ),
FILTER ( Dim, 'Fact'[BU_id] = Dim[BU_id] ),
USERELATIONSHIP ( 'Fact'[BU_id], Dim[BU_id] )
)
BR,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Lookupvalue() can also be used in this case which does not depend on relationships in the model.
Column =
LOOKUPVALUE( Dim[BU_name],Dim[BU_id],fact[BU_id])
Hi @Gabiiiii ,
Create a column as below:-
Column =
CALCULATE (
LASTNONBLANK ( Dim[BU_name], Dim[BU_name] ),
FILTER ( Dim, 'Fact'[BU_id] = Dim[BU_id] ),
USERELATIONSHIP ( 'Fact'[BU_id], Dim[BU_id] )
)
BR,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Same situation in my data.
There is an inactive relationship between two tables and I cant make it active. Because data is complicated.
I want to pull 2 columns from Table B to Table A.
There is a Customer code column for the primary key.
But your solution doesn't work there.
I think most people assume that FILTER is automatically applied as the relationship was set though its inactive.
Thanks Samrath, after adding the FILTER, i am getting the correct value.
Thank you Samarth!