0

I have data that is in this wide format.

Dates        Rates   3-MoBill  9-MoBill   
01/31/2021   1.25    .90       2.45      
02/28/2021   2.50    .99       2.22
03/31/2021   2.00    1.03      2.79

Is there some way to use VBA or Power Query to get this stacked, so it essentially looks like this?

Rates     01/31/2021  1.25
Rates     02/28/2021  2.50
Rates     03/31/2021  2.00
3-MoBill  01/31/2021  .90
3-MoBill  02/28/2021  .99
3-MoBill  03/31/2021  1.03
9-MoBill  01/31/2021  2.45
9-MoBill  02/28/2021  2.22
9-MoBill  03/31/2021  2.79

I tried to pivot the data and I tried to transpose it, but neither thing worked, I guess because the final result is stacked in a long format.

ASH
  • 20,759
  • 19
  • 87
  • 200
  • 1
    https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f588221c7098 Searching for Excel + unpivot or depivot would give you some starting points. – Tim Williams Nov 23 '21 at 21:28
  • R/RStudio is good for that. Cleaning pivoted data was a reason I started using it. Especially the tidyverse set of passages and pivot_longer() would be suitable. – Jacek Kotowski Nov 23 '21 at 21:30
  • https://i.stack.imgur.com/PlBiR.png. Did you try Power Query yet? – BigBen Nov 23 '21 at 21:37
  • How much data are we talking here? 4 columns and some rows or hundreds...? Is google Sheets an option? – Apostolos55 Nov 23 '21 at 22:03
  • 1
    @BigBen, Power Query did the job. I Never used that thing before, but after watching just video on YouTube I had my answer. Here's the resource that helped me...may help others as well... https://www.youtube.com/watch?v=f3mCejcOAfU – ASH Nov 23 '21 at 22:06

0 Answers0