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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Lookupvalue brings in blank value

Hi!

I am facing some issue with teh LOOKUPVALUE results. Basically I have master Table with ID's and Date and I have another Table with ID 1 , ID 2, Date 1 & Date 2 as columns. The Relatuonship between Table 1 and Table two is on ID-> ID 1, so I am getting the Date 1 Populated with the relationship . I wanted to fill out the Date 2 column using the LOOKUPVALUE but unfortunately its bringing in blank. 

Table 1(Master).

ID                         Date

ENCGNRL032801/3/2019
ENCGNRL032902/4/2020
ENCGNRL033003/5/2019
ENCGNRL033104/4/2019
ENCGNRL033206/3/2020
ENCGNRL033306/3/2021
ENCGNRL033403/7/2019
ENCGNRL033503/7/2020
ENCGNRL033604/5/2021
ENCGNRL033707/4/2020

  Table 2 

 

ID 1ID 2Date 1Date2
ENCGNRL03280ENCGNRL033301/3/2019??
ENCGNRL03290ENCGNRL033402/4/2020??
ENCGNRL03300ENCGNRL033503/5/2019??
ENCGNRL03310ENCGNRL033604/4/2019??
ENCGNRL03320ENCGNRL033706/3/2020??

 

LOOKUPVALUE(Date, ID, ID2), results in Blank, whereas it should have filled the dates.

 

help will be greatly appreciated

 

Thanks

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , One of these two should work

Both as new columns

Date 2 = minx(filter(table2,[ID 1] =earlier([ID 2])),[Date1])

Date 2 = minx(filter(table1,table1[ID ] =(table2[ID 2])),table1[Date])

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

View solution in original post

Anonymous
Not applicable

I was using the LOOKUPVALUE function itself. I think I have figured out and it does work in both the scenerios.

Thanks for your help on this.

View solution in original post

7 REPLIES 7
amitchandak
Super User
Super User

@Anonymous , One of these two should work

Both as new columns

Date 2 = minx(filter(table2,[ID 1] =earlier([ID 2])),[Date1])

Date 2 = minx(filter(table1,table1[ID ] =(table2[ID 2])),table1[Date])

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

@amitchandak understand there are alternative solutions but the question is why lookupvalue function is not working. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous looking at the table view, it should return,

 

- can you make sure ID2 doesn't have extra space etc which is not letting it match

or 

- create relationship on ID with ID2 and see if you get date1, just for testing.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi!

 

Well there is no space on ID2, I ahve checked that. As for chnaging the relationship from ID to ID2, I get the Date 2 now and miss out the Date 1, its doing exactly the opposite and I cant have both the relationships active  .i.e ID ->ID1 and ID->ID2.

 

Thanks 

@Anonymous As I mentioned in my previous reply was to check if we get the dates when switch relation to ID2 so that we can test if we get the date value and seems like it is working? What expression you are using to get the date value, RELATED ( Table1[Date] ), is this what you are using?

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I was using the LOOKUPVALUE function itself. I think I have figured out and it does work in both the scenerios.

Thanks for your help on this.

@Anonymous aha, I thought you have correct column name in the lookupvalue as you never put the table name,  never ever use anything without table name for columns and never use table name with measures, it is a best practice. This would have been solved quickly if I noticed the Id column is not from the correct table name.

 

Anyhow good to hear it is solved, that's all matter.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.