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

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

Reply
TCatron18
Helper I
Helper I

Pull Column from Unrelated Table

I have two tables that don't have a direct connection, but they are both connected a table that has a full list of all Users. I'm needing to pull a column from one of the tables into the other based on certain conditions.

 

Users Table

User
1
2
3

 

Term Table

UserDate
15/23/2024
2 
39/9/2022

 

Start Table

UserDate
12/1/2023
24/7/2024
35/6/2025

 

I want to pull the Term[Date] into the Start table, but only if Term[User] = Start[User] and Term[Date] >= Start[Date].

 

I've tried using LOOKUPVALUE, but have not had any success getting it to only pull in if it meets the conditions.

2 ACCEPTED SOLUTIONS
SamsonTruong
Super User
Super User

Hi @TCatron18 ,

I was able to create a calculated column for Term Date in the Start Table using the following DAX:

Term Date = 
VAR CurrentUser = [User]
VAR CurrentStartDate = [Date]
RETURN
    CALCULATE(
        MIN(Term[Date]),
        FILTER(
            Term,
            NOT ISBLANK(Term[Date]) &&
            Term[Date] >= CurrentStartDate
        ),
        TREATAS({CurrentUser}, Term[User])
    )


Using this calculated column with your test data, I get the following output:

SamsonTruong_0-1748552089986.png

If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.

Thanks,

Samson

View solution in original post

techies
Super User
Super User

Hi @TCatron18 please try this

 

MatchedTermDate =
CALCULATE(
    MIN('term table'[Date]),
    FILTER(
        'term table',
        'term table'[User] = 'start table'[User] &&
        NOT(ISBLANK('term table'[Date])) &&
        'term table'[Date] >= 'start table'[Date]
    )
)
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

View solution in original post

2 REPLIES 2
techies
Super User
Super User

Hi @TCatron18 please try this

 

MatchedTermDate =
CALCULATE(
    MIN('term table'[Date]),
    FILTER(
        'term table',
        'term table'[User] = 'start table'[User] &&
        NOT(ISBLANK('term table'[Date])) &&
        'term table'[Date] >= 'start table'[Date]
    )
)
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978
SamsonTruong
Super User
Super User

Hi @TCatron18 ,

I was able to create a calculated column for Term Date in the Start Table using the following DAX:

Term Date = 
VAR CurrentUser = [User]
VAR CurrentStartDate = [Date]
RETURN
    CALCULATE(
        MIN(Term[Date]),
        FILTER(
            Term,
            NOT ISBLANK(Term[Date]) &&
            Term[Date] >= CurrentStartDate
        ),
        TREATAS({CurrentUser}, Term[User])
    )


Using this calculated column with your test data, I get the following output:

SamsonTruong_0-1748552089986.png

If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.

Thanks,

Samson

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors