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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

IF excel has vlookup code , it will get error when import in Power BI

i have one excel with several sheet , one column A in sheet A using vookup column B in sheet B in same excel as first  picture , when i import it in Power BI , that column A return error as second picture , how to fix

KevinGuan_0-1715579234896.png

 

KevinGuan_1-1715579357780.png

 

6 REPLIES 6
danextian
Super User
Super User

Hi @Anonymous ,

 

You can either:

  • right click the column header and click replace error. You can replace it with null by typing null or replace it with any other value
  • or you can remove rows with errors which, of course, will remove the entire row altogether.
  • danextian_2-1715583613761.png

     





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

but can i use vlook code when click replace error , and when i writing vlookup , the system does not show this code , it seems not avaliable in Power BI . 

 

Although the DAX functions are  similar to those of Excel, there is no  VLOOKUP in Power BI. Look into using LOOKUPVALUE. If the tables have a direct relationship and you are trying to create a calculated column from the many side of o a one-to-many relationship, you can use RELATED function. Note: LOOKUPVALUE expects a single result - unlike in Excel, it won't pickup the first match - it will throw an error.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

oK,it may difficult for me to understand , let me do example :

1. i have import sheet A , with column A ; sheet B with column A and B in power BI ;

2, Now i want create column B in sheet A based on colunmn A ,  that means A1 value in sheet A , then system look for A1 value in sheet B , find the related B value , then return to B1 in sheet A . so how to modify qury .

 

you can use LOOKUPVALUE for that. But as previously mentioned, it doesn't work the way VLOOKUP in Excel does. For example, if your lookupvalue is A and there are two matching rows with different values in the other table, it will throw an error. As to the handling of errors like #N/A from Excel, please refer to my previous comments.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@Anonymous 

you can try to use IFERROR to remove errors in excel , then import to powerbi

 

or 

you can do the vlookup in powerbi

 

https://learn.microsoft.com/zh-cn/dax/lookupvalue-function-dax?wt.mc_id=DP-MVP-5004616

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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