Forum Discussion

HenriqueReis's avatar
HenriqueReis
Resolver I
4 years ago
Solved

Use a column head as a value for a new column

Hello!

 

Now in my data set I have a column to enumerate the weeks (in portuguese week = semana) and a column for each day of the week (in portuguese: segunda = monday, terça = tuesday, quarta = wednesday). How can I tranform the dataframe above in just three columns with "semana" (the column I already have), day of week and the float value?:

 

I did some ilustration to explain what do I want:

 

Please, I appreciate any help.
Thanks, regards from BR.

  • UNpivot the days columns in Power Query.  I think it's what you are looking for

2 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    UNpivot the days columns in Power Query.  I think it's what you are looking for

    • HenriqueReis's avatar
      HenriqueReis
      Resolver I

      Was almost this, but your answer was usefull to me to find the solution.

       

      Thanks a lot!