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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
DanFromMontreal
Helper III
Helper III

Concatenate results in one CELL for for each item

Dear Power Query community,

I would like to obtain a table containg, for each individual Source, all the Type-Num in 1 cell.

Left side is what I get when I analyze ma data via a Pivot Table.  Not exactly what I want.

Is there an easy way with Power Query to transform the data and get what I want?

Thank you

 

 

DanFromMontreal_0-1648671758385.png

 

 

 

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @DanFromMontreal 

 

You can group by in Power Query, your original dataset can do Concat in DAX and show the result in visual as well

Vera_33_0-1648685097987.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ1NPY3M4xS0lFycvaN0DU0NzYwV4rVwZQxBspgSgRE6JoYGlogSVgEwnVYWpoqxcYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Source = _t, #"Type-Num" = _t]),
    #"Grouped Rows" = Table.Group(Source, {"Source"}, {{"Type-Num", each Text.Combine(_[#"Type-Num"],";")}})
in
    #"Grouped Rows"

 

View solution in original post

2 REPLIES 2
Vera_33
Resident Rockstar
Resident Rockstar

Hi @DanFromMontreal 

 

You can group by in Power Query, your original dataset can do Concat in DAX and show the result in visual as well

Vera_33_0-1648685097987.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ1NPY3M4xS0lFycvaN0DU0NzYwV4rVwZQxBspgSgRE6JoYGlogSVgEwnVYWpoqxcYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Source = _t, #"Type-Num" = _t]),
    #"Grouped Rows" = Table.Group(Source, {"Source"}, {{"Type-Num", each Text.Combine(_[#"Type-Num"],";")}})
in
    #"Grouped Rows"

 

@Vera_33 .  Just what I needed and simple.  Thank you

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors
Top Kudoed Authors