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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
campelliann
Post Patron
Post Patron

Lookupvalue returning the complete column in blanks

Hi,


So I have this fact table which unrelated to a lookup table, and I am extracting values from the latter using the lookupvalue.


The thing is that I am getting all blanks, and I have no idea why. Some Ids are only in the fact table, but I am using 0 as the alternative result. What is going on here?


Ideas?


Thanks!

5 REPLIES 5
dedelman_clng
Community Champion
Community Champion

Hi @campelliann - can you provide the code you are using, along with a sample of your data? Hard to know what is happening without specifics.

 

Or better yet if you can share a copy of your pbix with sensitive data removed. Use OneDrive, Googledrive, dropbox, etc to share a link.

 

David

hi @dedelman_clng, thanks for your reply. The problem is that the complete file is sensitive. I did a new table, where I filtered the IDs from the first Table, to get only those who are common in both tables. In this way the lookupvalue worked. It seems the cause were the IDs that were non-existent in the table from which I am extracting the field.

Does this help? 

HI @campelliann - can you provide a screenshot of the table structure (from the model screen, not the data) and the code you are using with LOOKUPVALUE ?  It may be a simple fix that doesn't require creation of a 3rd table to work.

campelliann_0-1614304800656.png

I want the field "orçamento" from fields. So Lookupvalue(Fields orçamento [orçamento], Fields orçamento [ID], Beebole completo [Project ID]).  It seems that the IDs that live on Beebole but not on Fields orçamento are messing this. @dedelman_clng 

Hi @campelliann -

 

You said initially that you were using 0 as an alternate result, but your code

 

Lookupvalue(Fields orçamento [orçamento], Fields orçamento [ID], Beebole completo [Project ID])

 

does not have that alternate result. 

 

Aside from that, given that I can't see the rest of your model, it is possible that there are other filters in play that you are not aware of on either or both of the tables. You could try this:

 

CALCULATE(
   Lookupvalue(Fields orçamento [orçamento], 
               Fields orçamento [ID], 
               Beebole completo [Project ID], 0),
   ALL(Fields orcamento)
)

 

Beyond that, without the context of seeing the entire report, I don't think there is much else I can help with.

 

David

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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