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
RichHead1821
Resolver I
Resolver I

Retrieve a date from another table where criteria is met

Hi,

 

I have two tables:

T1 holds:  interviewID, status, statusvalue & statusdate

T2 holds: interviewID, lots of other columns and a new column created by DAX which I want to store a date when a certain status & statusvalue is found in T1.

 

T2 new column measure = 

LOOKUPVALUE('T1'[StatusDate],'T1'[interviewId],SelectedValue('T2'[interviewId]),T1[status],"Quoted",T1[statusvalue],"Complete")
 
I can see there are entries in T1 with interviewId which match entries in T2 and that T1 has lots where the status = Quoted and th statusvalue = Completed; but the DAX never returns a date (it does not error, just never seems to find the matches and return a date).
 
As I thought this was the easy part of what I'm building it has left me somewhat discombobulated.
1 ACCEPTED SOLUTION

Solution remove the 'SELECTEDVALUE' from the DAX:

 

T2 new column measure = LOOKUPVALUE('T1'[StatusDate], 'T1'[interviewId],' T2'[interviewId], T1[status],"Quoted", T1[statusvalue],"Complete")

View solution in original post

10 REPLIES 10
harshnathani
Community Champion
Community Champion

Hi @RichHead1821 ,

 

Can you share some sample date.

 

Regards,

Harsh Nathani

No, as the data is commercially sensitive.

 

The two IDs are wholenumbers, the status and statusvalue are text and the date to return and the new column are both datetime

Hi @RichHead1821 ,

 

 

Try creating some dummy values. i can try but you know how the data looks like 🙂

 

Regards,

Harsh Nathani

How do I share a PBIX file here?

Hi @harshnathani - I have an example PBIX file which demonstrates this (with dummy data) - but have no idea how to share that data

 

 

This is T1

RichHead1821_0-1596805471980.png

This is T2

RichHead1821_1-1596805519539.png

Relationships

RichHead1821_2-1596805587593.png

 

@RichHead1821 , I do see any date in T1. But any date in T1 in slicer can filter T2

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I am trying to create the date in T1, using the DAX in the first screenshot...

Solution remove the 'SELECTEDVALUE' from the DAX:

 

T2 new column measure = LOOKUPVALUE('T1'[StatusDate], 'T1'[interviewId],' T2'[interviewId], T1[status],"Quoted", T1[statusvalue],"Complete")

Hi @RichHead1821 ,

 

Try One Drive or Google Drive.

 

Regards,

HN

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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.