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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gvg
Post Prodigy
Post Prodigy

DAX to get text value from related table

Hi experts,

I need to return Product Name from a related table that has a permanent relationship through another field. I use CALCULATE. However it requires calculated expression, if I am correct. Usually SUM, MIN, MAX functions are used. But how do I get a text value from a related table, on which I can not perform such calculations, please? I am looking for something like this:


    

ProductName = 
    CALCULATE(
        [ProductNames],
      USERELATIONSHIP(Sales[ProductCode],Products[ProductCode]) 
    )

but this is not a valid measure. Sales and Products tables are related not via Productcode in my case.

1 ACCEPTED SOLUTION
gvg
Post Prodigy
Post Prodigy

Well, one way out of this situation is to make a reference table. Say [ProductNames] reside in ProductCatalog table. You can make a reference table for ProductCatalog and then make the necessary relationship to that reference table.

View solution in original post

1 REPLY 1
gvg
Post Prodigy
Post Prodigy

Well, one way out of this situation is to make a reference table. Say [ProductNames] reside in ProductCatalog table. You can make a reference table for ProductCatalog and then make the necessary relationship to that reference table.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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