Forum Discussion

DarylRob's avatar
DarylRob
Helper I
4 years ago
Solved

Unpivot columns but create two value columns

Hi Chaps,    I've got a table like below and I want to be able to unpivot it so it creates an "Hours" column and a "MRR" column but then only one row per quarter...   Name Q1 Hours Q2 Hours ...
  • bcdobbs's avatar
    4 years ago

    In power query:

     

    1) Unpivot so you end up with:

    Gary, Q1 Hours, 100

    Gary, Q1 MRR, 10

    etc....

     

    2) Split the column with rows like Q1 Hours and Q1 MRR into two using either column from example or split column on deliminator (space). Ending up with:

    Gary, Q1, Hours, 100

    Gary, Q1, MRR, 10

    etc....

     

    3) You can then pivot to get Hours and MRR as column names.