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
dom-mitchell
Frequent Visitor

LOOKUPVALUE based on 2 variables issue

Hi all, 

 

I'm trying to get a value (Team) from one table (Team List) to pull through to a new column in a second table (Target List) based on two columns within both tables (Name and Month) which should match.

 

A rough sample of the data is as follows:

 

Team List

NameMonthTeam
RyanJan1
RyanFeb1
RyanMar1
RyanApr1
RyanMay1
RyanJun1
RyanJul2
RyanAug2
RyanSep2
RyanOct2
RyanNov2
RyanDec2

 

Target List

NameMonthTargetTeam
RyanJan10000 
RyanFeb10000 
RyanMar10000 
RyanApr10000 
RyanMay10000 
RyanJun10000 
RyanJul10000 
RyanAug10000 
RyanSep10000 
RyanOct10000 
RyanNov10000 
RyanDec10000 

 

I have tried the following DAX using the LOOKUPVALUEFUNCTION but, although doesn't return an error, isn't pulling through the correct data:

 

 

 

Team = LOOKUPVALUE('Team List'[Team],'Team List'[Name],[Name],'Team List'[Month],[Month])

 

 

 

That is giving me the result of:

Target List

NameMonthTargetTeam
RyanJan100001
RyanFeb100001
RyanMar100001
RyanApr100001
RyanMay100001
RyanJun100001
RyanJul100001
RyanAug100001
RyanSep100001
RyanOct100001
RyanNov100001
RyanDec100001

 

Why is it not picking up that Team should be '2' from July onwards? Very confused by this and not sure where I'm going wrong. 

9 REPLIES 9
parry2k
Super User
Super User

sure I can try to look at it. 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.

 



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

@dom-mitchell I just did with your sample data and it works, see attached Power BI file.

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.

 

 



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.

Yeah, it looks to be the same as mine but for some reason, mine just doesn't pull the data through correctly. 

 

Could I email you the PBIX? Don't really want to put it up here for download. 

parry2k
Super User
Super User

@dom-mitchell what is that relationship? Is that relationship with both the tables? Please provide more details on the model, it is not something you are doing wrong using lookupvalue it is the relationship which is causing the issue and without having full details it is hard to provide any solution.

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.

 



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.

Thanks for the help so far @parry2k .

 

I've attached a screenshot of the relationship view. 

 

Screenshot 2022-09-28 192617.jpg

 

I'm tempted to upload the pbix but it contains significant company data which is a worry for me to put up here. 

parry2k
Super User
Super User

@dom-mitchell and if there is a relationship, delete the relationship and then it should work.

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.

 



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.

I've now tried it with no relationship between the tables and it still isn't pulling the values thorugh correctly. Same result as with the relationship. 

parry2k
Super User
Super User

@dom-mitchell is there any relationship between these tables?

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.

 



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.

There is a relationship via third table which needs to be there to make soemthing else in the report work. 

Helpful resources

Announcements
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!

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.

Top Solution Authors
Top Kudoed Authors