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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jwelch176
Frequent Visitor

Power BI Excel Index Match help needed

New user here.  I have two tables in my Power BI Report.  Table 1 is a contact list with addresses.

NameAddress1Address2CityStateZip
Tom Jones123 Sesame St BeavertonOR97003

 

Table 2 has zip codes and their driving distances to four different locations.  

Zip CodeAlice's houseBarbara's houseCharlie's houseDerrick's HouseClosest Location -  DistanceClosest Location -  Name
9700217.7713.35224.65926.04813.352Barbara's house
970036.51711.8279.33618.6886.517Alice's house
9700430.6126.19239.90419.73819.738Derrick's House
970055.1448.76811.18314.2365.144Alice's house
970067.29712.1710.75517.8727.297Alice's house
970077.03311.897.17921.1387.033Alice's house
9700806.32812.70517.4350Alice'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.

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @jwelch176 ,

 

In Query Editor, select Zip Code, Closest Location - Distance, Closest Location - Name and use unpivot other columns feature.

1.PNG

Result:

2.PNG

Then use merge query feature.

3.PNG

Expand the table and remove duplicate.

4.PNG

5.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @jwelch176 ,

 

In Query Editor, select Zip Code, Closest Location - Distance, Closest Location - Name and use unpivot other columns feature.

1.PNG

Result:

2.PNG

Then use merge query feature.

3.PNG

Expand the table and remove duplicate.

4.PNG

5.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Greg_Deckler
Super User
Super User

@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-...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@jwelch176 Did that work?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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