Equivalent of TEXTJOIN in Power Query

clmish

New Member
Joined
Nov 11, 2008
Messages
15
I wonder if you can suggest a solution for this business question: A given value created to be a matching lookup key between tables can have multiple records in a transaction file. I need to find the condition where the Lookup value has “conflicting” (different) values in another column between the multiple related records. I am trying to replace a TEXTJOIN formula in Excel with a query in Power Query.

Ex: Lookup Value: 1234
Record_1 Status Column: Exported
Record_2 Status: Archived
Record_3 Status: Exported
Record_4 Status: Deleted

Versus Lookup Value: 5678
Record_1 Status Column: Exported
Record_2 Status: Exported
Record_3 Status: Exported

I’m looking for certain combinations of Status values for a given record. The latter record's Action Column (new one I would add) for #5678 is “COMPLETED” and the former (#1234) would be “REVIEW”.

How can I iterate and collect these statuses per lookup value and return a table with the ones that need Review? I tried Group By, but I’m looking to just add a column with the outcome and it not listing the Status, just counting them. I have tried to Group By with Text.Combine instead of List.Sum or the typical aggregation.

I have a number of test conditions that I’m hoping to evaluate with an ACTION value, then run an “anti-join” query against an original source table to tell me which records require review. (Not “COMPLETED” Action.) There are thousands of records to evaluate, so having an efficient process would be desirable.
There’s probably a simple solution, I just don’t know enough to figure it out! Thanks, if you can suggest a direction. Deadlines!!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Please upload a sample of your data and a mocked up solution of what you want. Use the XL2BB feature available on this site so that we don't have to recreate your data to create a solution.
 
Upvote 0
I found the answer myself - Group By, use some aggregation like Sum on the text column. It shows Error, but go into the M code and change List.Sum to Text.Combine and add ", " after the column name.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top