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
Chris_Palmer
Regular Visitor

Create New Column using Lookup against Inactive Relationship

Hi,


I am building a report based upon the WorldwideImportersDW database. To simplify my data structure for users, I would like to use DAX to look up the Salesperson and Picker names and include them in the Order table.


I have the following [simplified] table and relationship structure:


================                         ===============

     ORDER                                   EMPLOYEE

================                         ===============

Salesperson Key --------(Active)-------- Employee Key

Picker Key      - - - -(Inactive) - - - - - - ^

                                         Name


I have the Salesperson lookup working using the RELATED function on the Active relationship:

Salesperson = RELATED(Employee[Name])


What I can't work out is how to add a column to look up the Picker based upon the Inactive relationship. I have tried the following, but it is not returning the correct result (only returns a value where the salesperson == picker):

Picker = LOOKUPVALUE(Employee[Name],Employee[Employee Key],'Order'[Picker Key])


Any ideas?


Many thanks,

 

Chris

1 ACCEPTED SOLUTION
Anonymous
Not applicable

No idea why LOOKUP does not work for you... It does for me. But here's another method:

 

var __currentPicker = 'Order'[Picker Key]
return
    SUMMARIZE(
        FILTER(
            Employee,
            Employee[Employee Key] = __currentPicker
        ),
        Employee[Name]
    )

Best

Darek

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

No idea why LOOKUP does not work for you... It does for me. But here's another method:

 

var __currentPicker = 'Order'[Picker Key]
return
    SUMMARIZE(
        FILTER(
            Employee,
            Employee[Employee Key] = __currentPicker
        ),
        Employee[Name]
    )

Best

Darek

@Anonymous  It works!  Many thanks for your help.  I now have:

 
Picker = (var __currentPicker = 'Order'[Picker Key]
return 
    SUMMARIZE(
        FILTER(
            Employee,
            Employee[Employee Key] = __currentPicker
        ),
        Employee[Name]
    )
)
 

Helpful resources

Announcements
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!

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.