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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
TCatron18
Helper II
Helper II

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 | DP-700 Certified

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 | DP-700 Certified
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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.