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

Power BI is turning 10! Letโ€™s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
B_kaydo
Advocate I
Advocate I

Lookupvalue not working in one way with specific table

I have 3 tables named Table A, Table B. They have one column in which the information are the same, "Folder name".

For a formula in table B, I need to LOOKUPVALUE the Folder Name from Table A, but when I do this in table B:

 

Column = LOOKUPVALUE('Table_A'[Folder_name],'Table_A'[Folder_name],'Table_B'[Folder_name])
There are no value in so column.

But if I do this in table A

Column =
LOOKUPVALUE('Table_B'[Folder_name],'Table_B'[Folder_name],'Table_A'[Folder_name])
I find the values I expect in the column!

Why does my lookupvalue works in a table with the same datas, and not in the other one ? I can't share the data as it is confidential, but I've tried with a another Table C containing a similar [Folder_name] column, and got the same result

2 ACCEPTED SOLUTIONS
Poojara_D12
Super User
Super User

Hi @B_kaydo 

To fix the LOOKUPVALUE issue between Table A and Table B:

  1. Check for Relationships: Ensure thereโ€™s an active relationship between Table A and Table B on the Folder_name column. Without this, LOOKUPVALUE wonโ€™t work correctly.

  2. Use RELATED if Relationship Exists: If there's a relationship, try using the RELATED function instead of LOOKUPVALUE:

 

Column in Table B = RELATED('Table A'[Folder_name])

 

  • Ensure Matching Data Types: Make sure the Folder_name column in both tables has the same data type (e.g., text) and no inconsistencies like extra spaces.
  • Handle Duplicates: If Table A contains duplicates, LOOKUPVALUE will fail. You may need to filter duplicates or use additional columns to ensure uniqueness.
  • By following these steps, you should be able to resolve the issue and correctly pull values from Table A into Table B.

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" ๐Ÿ™‚

Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
YouTube: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

View solution in original post

Kedar_Pande
Super User
Super User

@B_kaydo 

  • Try creating a relationship between Table A and Table B based on the Folder_name column.
    Re-attempt your LOOKUPVALUE formula in Table B:
    Column = LOOKUPVALUE('Table_A'[Folder_name], 'Table_A'[Folder_name], 'Table_B'[Folder_name])
  • Check the data type for the Folder_name columns in Table A and Table B. Ensure both are set to the same data type (likely Text).
  • If you have established a relationship between Table A and Table B, you could use RELATED instead of LOOKUPVALUE:
    Column = RELATED('Table_A'[Folder_name])

๐Ÿ’Œ If this helped, a Kudos ๐Ÿ‘ or Solution mark would be great! ๐ŸŽ‰
Cheers,
Kedar
Connect on LinkedIn

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @B_kaydo 

 

Thanks to Poojara_D12 and Kedar_Pande for their great replies to this thread.

Please consider accepting their replies as a solution if it has helped you solve your problem.

 

If you have relationships between tables, RELATED is the more recommended method. 

vxianjtanmsft_0-1731898249607.png

LOOKUPVALUE function (DAX) - DAX | Microsoft Learn

RELATED function (DAX) - DAX | Microsoft Learn

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Kedar_Pande
Super User
Super User

@B_kaydo 

  • Try creating a relationship between Table A and Table B based on the Folder_name column.
    Re-attempt your LOOKUPVALUE formula in Table B:
    Column = LOOKUPVALUE('Table_A'[Folder_name], 'Table_A'[Folder_name], 'Table_B'[Folder_name])
  • Check the data type for the Folder_name columns in Table A and Table B. Ensure both are set to the same data type (likely Text).
  • If you have established a relationship between Table A and Table B, you could use RELATED instead of LOOKUPVALUE:
    Column = RELATED('Table_A'[Folder_name])

๐Ÿ’Œ If this helped, a Kudos ๐Ÿ‘ or Solution mark would be great! ๐ŸŽ‰
Cheers,
Kedar
Connect on LinkedIn

 

Poojara_D12
Super User
Super User

Hi @B_kaydo 

To fix the LOOKUPVALUE issue between Table A and Table B:

  1. Check for Relationships: Ensure thereโ€™s an active relationship between Table A and Table B on the Folder_name column. Without this, LOOKUPVALUE wonโ€™t work correctly.

  2. Use RELATED if Relationship Exists: If there's a relationship, try using the RELATED function instead of LOOKUPVALUE:

 

Column in Table B = RELATED('Table A'[Folder_name])

 

  • Ensure Matching Data Types: Make sure the Folder_name column in both tables has the same data type (e.g., text) and no inconsistencies like extra spaces.
  • Handle Duplicates: If Table A contains duplicates, LOOKUPVALUE will fail. You may need to filter duplicates or use additional columns to ensure uniqueness.
  • By following these steps, you should be able to resolve the issue and correctly pull values from Table A into Table B.

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" ๐Ÿ™‚

Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
YouTube: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

Hello,

The issue comes from the duplicates, in the table A there are duplicates which seem to perturb the formula.

Thank you !

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.