Forum Discussion

JeremyLeee's avatar
JeremyLeee
Helper I
7 years ago
Solved

Expand multiple columns in power query

Hi All, Is that possible to expand 'value' for all the columns at once? I could do it one column by one column (see the expanded second column) but that is too slow. Thanks in adance, Jeremy...
  • ImkeF's avatar
    ImkeF
    7 years ago

    Hi JeremyLeee ,

     

    1. Check the column(s) that don't contain data to be expanded (in your case it looks just like "Column1.timestamp"
    2. Rightclick your mouse and click "Unpivot other columns"
    3. Expand "Value" from the new "Value" column
    4. Ask yourself if you should dance the happy dance right now (because your data is in the shape that's actually best suited for the data model) or you first need to pivot it back 
    5. optional: If you actually want to bring back the values into one column each, check the new "Attribute" column -> on the Transform tab, choose "pivot column" -> choose "Value" in the field "Values column" 

    If the execution time of this query takes too long, I might have a quicker solution, but that requires some coding.