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
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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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