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
rob_mysbxsec
Helper II
Helper II

how to enable left join with mysql group_concat csv merged instances of right side column values

 

Any insights on how to address power bi power query matter outlined in this stackoverflow post?  

 

Note that i had to use stackoverflow because repeated attempts to post here kept messing with the text and code box formatting or erroring out complaining about html being embedded in text.

1 ACCEPTED SOLUTION
Smauro
Solution Sage
Solution Sage

Hi @rob_mysbxsec ,

Is this what you're looking for?

let
    Source = Table.NestedJoin(#"mysqldb support_request", {"id"}, #"mysqldb support_request_tag"[[#"support_request_id"], [#"tag_name"]], {"support_request_id"}, "tag_name_csv", JoinKind.LeftOuter),
    #"Transformed tags" = Table.TransformColumns(Source, {{"tag_name_csv", each Text.Combine(_[#"tag_name"], ", "), type text}})
in
    #"Transformed tags"



Feel free to connect with me:
LinkedIn

View solution in original post

5 REPLIES 5
Smauro
Solution Sage
Solution Sage

Hi @rob_mysbxsec ,

Is this what you're looking for?

let
    Source = Table.NestedJoin(#"mysqldb support_request", {"id"}, #"mysqldb support_request_tag"[[#"support_request_id"], [#"tag_name"]], {"support_request_id"}, "tag_name_csv", JoinKind.LeftOuter),
    #"Transformed tags" = Table.TransformColumns(Source, {{"tag_name_csv", each Text.Combine(_[#"tag_name"], ", "), type text}})
in
    #"Transformed tags"



Feel free to connect with me:
LinkedIn

@Smauro that worked.  Thank you very much.  Leaves me wondering what scenario Table.AggregateTableColumn( . . . ) function is for when Table.TransformColumns( . . . ) covers this case.

PhilipTreacy
Super User
Super User

Hi @rob_mysbxsec 

Without seeing your source data and an example of your expected result it's difficult to envusion what you are trying to do.

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


PhilipTreacy
Super User
Super User

Hi @rob_mysbxsec 

Can you supply the data tables/queries/PBIX file you are trying to merge and an example of the expected result.

But the general approach to joining tables in PBI/PQ is, in the Query Editor, Home Tab, click on Merge Queries -> Merge Queries As New then select the left and right tables, the type of join and the matching/joining column

join.png

Regards

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Thanks for response.  I'm not having any issues setting up left join merge query to new table output.  What i'm looking for is way to use #"Aggregate . . . " in lieu of #"Grouped Rows . . ." on column in right side of join to produce single row per left side where there is multiple right side matches and combining a specific column in the right side matches into a comma seperated value using Text.Combine(List.???, ", ") function.  This is detailed in the stackoverflow post referenced in the question overview.

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