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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

To filter aux table values with the fact table values

I have a request that to show only the values in the filter which can be found in my fact table, in a nutshell:

mpataki32_0-1671031672894.png


My problem is that I can't use bi-directional relationships between the tables (in other words: I can't connect them on the modelling pane). 

So I would like to create a DAX measure with USERELATIONSHIP which will return for my slicer the values which can be found in the fact table, but "translated" it with the aux table's Name field. 

1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

I am not sure userelationship works in your way of explanation. Assuming you dont want to create relationships and want the text value from another table.

note: Relationships - active, inactive are always preferred approach. 

 

Calculated column approach:

 

Name Column = LOOKUPVALUE(P123_AuxTable[Name], P123_AuxTable[ID], P123_FactTable[ID])

 

Measure approach:

 

Name Measure = 
var _selVal = SELECTEDVALUE(P123_FactTable[ID])
var _name = calculate(Max(P123_AuxTable[Name]), P123_AuxTable[ID] = TREATAS( { _selVal }, P123_AuxTable[ID]))

return _name  

 

sevenhills_2-1671042811762.png

 

Data:

FYI: I added ID "99" to check the outlier. 

sevenhills_0-1671042645720.png

Output:

sevenhills_1-1671042690483.png

Hope this helps!

 

View solution in original post

1 REPLY 1
sevenhills
Super User
Super User

I am not sure userelationship works in your way of explanation. Assuming you dont want to create relationships and want the text value from another table.

note: Relationships - active, inactive are always preferred approach. 

 

Calculated column approach:

 

Name Column = LOOKUPVALUE(P123_AuxTable[Name], P123_AuxTable[ID], P123_FactTable[ID])

 

Measure approach:

 

Name Measure = 
var _selVal = SELECTEDVALUE(P123_FactTable[ID])
var _name = calculate(Max(P123_AuxTable[Name]), P123_AuxTable[ID] = TREATAS( { _selVal }, P123_AuxTable[ID]))

return _name  

 

sevenhills_2-1671042811762.png

 

Data:

FYI: I added ID "99" to check the outlier. 

sevenhills_0-1671042645720.png

Output:

sevenhills_1-1671042690483.png

Hope this helps!

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.