Power Query - Return column name each time specific cell value is detected?

M, Johannes 86 Reputation points

Hey guys!
I got this Table in the Power Query Editor. There are several Persons with different Attributes.
How can I get my table in a format like this in the Power Query Editor? The first row schould be the person and the second is filled with the attributes were the value is one. They should be in a single row with a seperating figure.
If you could help me that would be awesome and would safe my day!

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
24,013 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,348 questions
{count} votes

Accepted answer
  1. Lz._ 8,801 Reputation points


        PreviousStepName = ...
        UnpivotedOtherColumns = Table.UnpivotOtherColumns(PreviousStepName, {"Person"}, "Attribute", "Value"),
        FilteredValues = Table.SelectRows(UnpivotedOtherColumns, each ([Value] = 1)),
        GroupedRows = Table.Group(FilteredValues, {"Person"},
            {{"Attributes", each Text.Combine([Attribute],", "), type text}}

0 additional answers

Sort by: Most helpful