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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

lookupvalue sometimes works

Hello all,

 

i have 2 face tables that are not related to one another but are Via customer Dim table:

Adambk_0-1637752012486.png

 

I need to create a calc colum in Fact Table 2 that looks up a column from Fact Table 1

based on some columns that match in BOTH tables:

 

Adambk_1-1637752301511.png

 

 

very generic.

the problem is that somethimes it works and somthimes it doent (when it totally should!!)

Adambk_2-1637752605119.png

 

 

and somthines it dosnt work:

Adambk_3-1637752691427.png

 

 

I know when I get a blank thats because not ALL the condiotns are met but they are. they all meet but I still get a blank

any ideas? 

 

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

As @HotChilli  mentioned above, hidden spaces and other invisible characters often affect the lookup result. An easy way is to use the Len function to check whether the string lengths are the same.
Remove the hidden characters and often you will get the correct result.

 

 

Best Regards,
Community Support Team _ Zeon Zheng

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

HotChilli
Super User
Super User

I think you will have to investigate the data quality of the columns as it looks like there's a difference between tables. You can do this in power Query, using column quality, distribution, profile from the View menu.

Are the ID columns text? If so they might need a Trim to remove spaces etc.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors