Home > front end >  Quick formatting of table in Excel/DAX
Quick formatting of table in Excel/DAX

Time:07-18

I'm new to using Excel/DAX.

Just wondering if there would be a quicker way to format the table:

Table 1

What I'm trying to achieve, is getting the table 1 to be formatted the same as table 2

Table 2

Notice how in table 2, there is only 1 column for the year. I understand that this creates duplications of the countries in the first column

Any advice would really help.

CodePudding user response:

  1. Load the table into PowerQuery
  2. Select the first 2 columns
  3. In the Transform tab select from Unpivot other columns
  4. There you go!

Btw, it's a typical ETL step (hence PowerQuery) called stacking a table from wide to long.

  • Related