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
RNightscape
Frequent Visitor

Group and concatenate

Hi all ,

On my table I would like to use 2 columns to group and concatenate the others to create a unique value about the purchase.

Is it possible?

 

This is the data

 

 

 

 

PBI_1.png

 

 

And This is the result I need.

 

 

PBI_2.png

 

 

Thanks in advance

1 ACCEPTED SOLUTION

@RNightscape

 

Please see attached file as well

 

Groupandconcatenate.png


Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@RNightscape

 

You can use this

 

Go to the advanced query editor and copy paste this

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckrMyVHSUQoOABJOOaWpQCooP6UoMz1fKVYHLh3kBSJSU9BkgwtLE4tS0bT7JhYl5xejyiPpR5IOKcpMzEvPASnwSyxJBFkUmZqTk1+ObE0sAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Product = _t, Store = _t, Color = _t, Seller = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Product", type text}, {"Store", type text}, {"Color", type text}, {"Seller", type text}}),
    #"Reordered Columns" = Table.ReorderColumns(#"Changed Type",{"Product", "Seller", "Store", "Color"}),
    #"Grouped Rows" = Table.Group(#"Reordered Columns", {"Product", "Seller"}, {{"Stores", each Text.Combine(Table.Column(_,"Store"),"-"), type table},{"Color", each Text.Combine(Table.Column(_,"Color"),"-"), type table}})
in
    #"Grouped Rows"

Regards
Zubair

Please try my custom visuals

@RNightscape

 

Please see attached file as well

 

Groupandconcatenate.png


Regards
Zubair

Please try my custom visuals

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.