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.
I have 2 tables, and I want to add the Region column to Table 2 based on the Customer Name match. If there is a customer name match, I'd like the region to match what is in Table 1. If there is not a match (i.e. Customer 'C'), I want the value to be Unknown. Can someone assist me with this?
Table 1
Customer Name | Region |
A | USA |
B | Europe |
Table 2
Customer Name | Region (desired column) |
A | USA |
B | Europe |
C | Unknown |
Solved! Go to Solution.
hi @Anonymous
You could use LOOKUPVALUE Function to create a calculate column as below:
https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax
Region = var _region= LOOKUPVALUE('Table 1'[Region],'Table 1'[Customer Name],'Table 2'[Customer Name]) return
IF(ISBLANK(_region),"Unknown",_region)
Result:
Regards,
Lin
hi @Anonymous
You could use LOOKUPVALUE Function to create a calculate column as below:
https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax
Region = var _region= LOOKUPVALUE('Table 1'[Region],'Table 1'[Customer Name],'Table 2'[Customer Name]) return
IF(ISBLANK(_region),"Unknown",_region)
Result:
Regards,
Lin
Hi @Anonymous ,
See the file attached. You just need to handle it on Power Query (clean values, merge with left or right (depends on where you start it, and finally replace null to Unknown like you wish).
Ricardo
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |