Forum Discussion

melikekurrt's avatar
melikekurrt
Frequent Visitor
1 year ago
Solved

How can I write ? a single "ACTION" based on "ID"

Hello,

I am new to Power BI, this may be a simple question for you but I would be very happy if you could help me.

 

Can I write the data in the "ACTION" column side by side in "RECORD_NUMBER" order? 

For example: apple banana strawberry cherry watermelon 

I have many "NUMBER" and "ACTION" data of these numbers. How do I show ?

 

  • Hi melikekurrt, check this:

     

    Output

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8vQ1NDQxMTUxVdJRMgHi5IzUoqJKpVgdVCkQLk8sSS3KTc3Jz8OQNgbi4pKixPIkrLqNgDgpMQ8IMaQMgTixoCAnVSk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [NUMBER = _t, RECORD_NUMBER = _t, ACTION = _t]),
        ChangedType = Table.TransformColumnTypes(Source,{{"RECORD_NUMBER", Int64.Type}}),
        GroupedRows = Table.Group(ChangedType, {"NUMBER"}, {{"CombinedACTION", each Text.Combine(Table.Sort(_, {"RECORD_NUMBER"})[ACTION], " "), type text}})
    in
        GroupedRows

     

1 Reply

  • dufoq3's avatar
    dufoq3
    Icon for Community Champion rankCommunity Champion

    Hi melikekurrt, check this:

     

    Output

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8vQ1NDQxMTUxVdJRMgHi5IzUoqJKpVgdVCkQLk8sSS3KTc3Jz8OQNgbi4pKixPIkrLqNgDgpMQ8IMaQMgTixoCAnVSk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [NUMBER = _t, RECORD_NUMBER = _t, ACTION = _t]),
        ChangedType = Table.TransformColumnTypes(Source,{{"RECORD_NUMBER", Int64.Type}}),
        GroupedRows = Table.Group(ChangedType, {"NUMBER"}, {{"CombinedACTION", each Text.Combine(Table.Sort(_, {"RECORD_NUMBER"})[ACTION], " "), type text}})
    in
        GroupedRows