The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Hi @Anonymous ,
You can either:
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.
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.
@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
Proud to be a Super User!
User | Count |
---|---|
87 | |
84 | |
36 | |
35 | |
30 |
User | Count |
---|---|
95 | |
74 | |
67 | |
52 | |
51 |