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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
sparvez
Helper I
Helper I

get row values on same cell

Hello altruists,

 

I have table with different product's colour. I want for same product all colour to be in same cell in Power Query, separated by some character such as forward slash. Can someone help pls?

 

table I have

TypeProdutColour
Fruit--apple--golden
Fruit--apple--red
Fruit--apple--green
Fruit--orange--yellow
Fruit--orange--orange
Vegetable--aubergine--navy
Vegetable--aubergine--white
Vegetable--tomato--red

 

 

Table I want,

TypeProdutColour
Fruit--apple--golden/red/green
Fruit--orange--yellow/orange
Vegetable--aubergine--navy/white
Vegetable--tomato--

red

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@sparvez Try this:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("hc8xCoAwDAXQu3S21/AILtIhpSEWalNCtHh7wQoOVtx+eMmHzLMZZYtqrRkMlJLwSsQpYDZu6LNg+DQSfF2yQKbGB6bE9dtbvHxCQgV/98LmUSjmNmXYj9+lukTtVSmvoPx84k4=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Type = _t, Produt = _t, Colour = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Type", type text}, {"Produt", type text}, {"Colour", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Type", "Produt"}, {{"Colours", each _, type table [Type=nullable text, Produt=nullable text, Colour=nullable text]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Lines.ToText(Table.ToList(Table.SelectColumns([Colours], "Colour")),"/"))
in
    #"Added Custom"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
sparvez
Helper I
Helper I

Thanks dude, it worked.  Happy new year.

just there is a spelling mistake in last "Produt" - it has to be "Product". I tell it for others to correct the spelling.

Greg_Deckler
Community Champion
Community Champion

@sparvez Try this:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("hc8xCoAwDAXQu3S21/AILtIhpSEWalNCtHh7wQoOVtx+eMmHzLMZZYtqrRkMlJLwSsQpYDZu6LNg+DQSfF2yQKbGB6bE9dtbvHxCQgV/98LmUSjmNmXYj9+lukTtVSmvoPx84k4=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Type = _t, Produt = _t, Colour = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Type", type text}, {"Produt", type text}, {"Colour", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Type", "Produt"}, {{"Colours", each _, type table [Type=nullable text, Produt=nullable text, Colour=nullable text]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Lines.ToText(Table.ToList(Table.SelectColumns([Colours], "Colour")),"/"))
in
    #"Added Custom"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

the previous one already worked

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.