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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
DevadathanK
Resolver I
Resolver I

Cannot create a column by searching for values in another table

Hello community!

<Message removed>

Thanks for any help!

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

Have you tried LOOKUPVALUE?https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I did, but i keep getting stcuk at one point.

In the latest LOOKUPVALUE used in the above code, the search column should be Employee ID, but it wont let me choose that option.

 

 

 

I managed to work around the issue that didnt let me pick EMPLOYEE ID, and managed to complete the code, but i cant seem to narrow down the Looked up value to a single value. There are multiple Leaves taken in a single week, so LOOKUPVALUE will return a table of values and not a single one.

The Error states "A table of multiple values was supplied where a single value was expected"

Is there anyother way to do this code other than LOOKUPVALUE? Or is there something that i missed to use along with LOOKUPVALUE?

I removed the multiple leaves that were coming in a single week. Now this code works. 

 

Employee IDEmployee NameLeave From Date Leave To DateFrom Week No. To Week No.Days
1001Miss. O1-Jan-201-Jan-20111
1007Mr. K2-Jan-203-Jan-20112
1009Mr. J2-Jan-2015-Jan-201310

 

But the ideal solution is to incorportate any scenario, and this code will fail in other situations.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.