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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
roscas
Helper I
Helper I

Show result in only one row

Good afternoon, I need help with the following case. If anyone could help me, I would appreciate it. I have a table where in the 'request' column there are duplicate values because there are values in different columns. What I need is to have only one row with the values from the columns. In the images, you will see what I have and the final result.

 

Result before

1.png

 final result

2.png

1 ACCEPTED SOLUTION
dufoq3
Super User
Super User

Hi @roscas,

 

Before

dufoq3_0-1714420148889.png

 

After

dufoq3_1-1714420163215.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjOxMLQwt1DSUfLKL05VCM7NLMkAcqAoVgdZBTZFcBUWBkCub2JRZqKCc0ZiWWoVFlPAauAIRTE2NeimYajBYl1sLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Request = _t, #"Policy Holder" = _t, Item1 = _t, #"Item 12" = _t, #"Item 13" = _t]),
    // You can probably delete this step.
    ReplaceBlankToNull = Table.TransformColumns(Source, {}, each if _ = "" then null else _),
    GroupedRows = Table.Group(ReplaceBlankToNull, {"Request"}, {{"All", each 
        [ a = Table.ColumnNames(_),
          b = Table.FillUp(Table.FillDown(_, a), a)
        ][b], type table}}),
    All = Table.Combine(GroupedRows[All])
in
    All

Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

3 REPLIES 3
dufoq3
Super User
Super User

Hi @roscas,

 

Before

dufoq3_0-1714420148889.png

 

After

dufoq3_1-1714420163215.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjOxMLQwt1DSUfLKL05VCM7NLMkAcqAoVgdZBTZFcBUWBkCub2JRZqKCc0ZiWWoVFlPAauAIRTE2NeimYajBYl1sLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Request = _t, #"Policy Holder" = _t, Item1 = _t, #"Item 12" = _t, #"Item 13" = _t]),
    // You can probably delete this step.
    ReplaceBlankToNull = Table.TransformColumns(Source, {}, each if _ = "" then null else _),
    GroupedRows = Table.Group(ReplaceBlankToNull, {"Request"}, {{"All", each 
        [ a = Table.ColumnNames(_),
          b = Table.FillUp(Table.FillDown(_, a), a)
        ][b], type table}}),
    All = Table.Combine(GroupedRows[All])
in
    All

Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Thanks  for your support!!!  it's working

You're welcome.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.