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.
New user here. I have two tables in my Power BI Report. Table 1 is a contact list with addresses.
Name | Address1 | Address2 | City | State | Zip |
Tom Jones | 123 Sesame St | Beaverton | OR | 97003 |
Table 2 has zip codes and their driving distances to four different locations.
Zip Code | Alice's house | Barbara's house | Charlie's house | Derrick's House | Closest Location - Distance | Closest Location - Name |
97002 | 17.77 | 13.352 | 24.659 | 26.048 | 13.352 | Barbara's house |
97003 | 6.517 | 11.827 | 9.336 | 18.688 | 6.517 | Alice's house |
97004 | 30.61 | 26.192 | 39.904 | 19.738 | 19.738 | Derrick's House |
97005 | 5.144 | 8.768 | 11.183 | 14.236 | 5.144 | Alice's house |
97006 | 7.297 | 12.17 | 10.755 | 17.872 | 7.297 | Alice's house |
97007 | 7.033 | 11.89 | 7.179 | 21.138 | 7.033 | Alice's house |
97008 | 0 | 6.328 | 12.705 | 17.435 | 0 | Alice's house |
I need to add a column to the address list that will look at the contact's zip code; do an index match function; and then bring back the data in the Closest Location - Name field.
Solved! Go to Solution.
Hi @jwelch176 ,
In Query Editor, select Zip Code, Closest Location - Distance, Closest Location - Name and use unpivot other columns feature.
Result:
Then use merge query feature.
Expand the table and remove duplicate.
Best Regards,
Jay
Hi @jwelch176 ,
In Query Editor, select Zip Code, Closest Location - Distance, Closest Location - Name and use unpivot other columns feature.
Result:
Then use merge query feature.
Expand the table and remove duplicate.
Best Regards,
Jay
@jwelch176 - I may be mistaken, but I would almost certainly unpivot those distance columns. Then it should be a cakewalk. Otherwise, maybe something like MC Aggregations (MIN) - https://community.powerbi.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-...
@jwelch176 Did that work?
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 |
---|---|
107 | |
98 | |
78 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |