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

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.

Reply
justlogmein
Helper III
Helper III

Doing a Vlookup but for data in groups (Excel Power Query/DAX)

I have a table of process paths (unique paths through a flowchart) and their assiocitated steps/questions. I have another table of answers to these steps/questions and I need to find which path the answers go through. The steps are not unique, what makes each path unique is the pemutations of the steps it has.

 

I need to get the Group letter of the path where all of the 'Old Process Step IDs' are shared between the path table and the answers table. They don't need to be in the same order, but if there are 20 in the answer table for a particular part, there needs to be 20 in the path group.

 

I have attempted this in DAX, but I think this is best suited to Power Query due to the grouping function. I just don't have the skills to do this though. Would someone mind taking a look at the attached file and let me know if there are some solutions for this?

 

(I can't locate a button to attach files on this forum) https://jmservicescomau-my.sharepoint.com/:x:/g/personal/jacob_jmservices_com_au/EQN-dxqnNWxFnnMuh-v...

 

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

Hi @justlogmein ,

 

Does @Thingsclump 's solution help you?

According to his solution, after merging, you can filter Group as i and PARTID as 1 to get the desired result.

vstephenmsft_0-1639464522260.png

 

Or you can create a calculated table using DAX.

Before you use the CROSSJOIN function, make sure that the column names of the two tables do not have the same name. Here I have modified the names of the Old Process Step ID.

Table =
FILTER (
    CROSSJOIN ( 'Question Mapping', 'Response List' ),
    [Old Process Step ID question] = [Old Process Step ID response]
)

vstephenmsft_2-1639464976643.pngvstephenmsft_3-1639464984172.png

vstephenmsft_4-1639465002605.png

After filtering, the result is as follows.

vstephenmsft_1-1639464936885.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @justlogmein ,

 

Does @Thingsclump 's solution help you?

According to his solution, after merging, you can filter Group as i and PARTID as 1 to get the desired result.

vstephenmsft_0-1639464522260.png

 

Or you can create a calculated table using DAX.

Before you use the CROSSJOIN function, make sure that the column names of the two tables do not have the same name. Here I have modified the names of the Old Process Step ID.

Table =
FILTER (
    CROSSJOIN ( 'Question Mapping', 'Response List' ),
    [Old Process Step ID question] = [Old Process Step ID response]
)

vstephenmsft_2-1639464976643.pngvstephenmsft_3-1639464984172.png

vstephenmsft_4-1639465002605.png

After filtering, the result is as follows.

vstephenmsft_1-1639464936885.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Thingsclump
Resolver V
Resolver V

Hi @justlogmein 

 

Just import both tables in Power query.

 

Thingsclump_0-1639070501712.png

 

Then do a merge

Thingsclump_1-1639070547846.png

 

Then expand.

Thingsclump_2-1639070592782.png

 

Thanks

www.thingsclump.com 

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

 

amitchandak
Super User
Super User

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors
Top Kudoed Authors