Forum Discussion
power Querry
Experts
I have below table. How do i unpivot this
| Year | 2013 | 2013 | 2013 | 2014 | 2014 | 2014 |
| Country | Name | First day | Last day | Name | First day | Last day |
| INDIA | A | 1 | 28 | A | 1 | 28 |
| INDIA | B | 5 | 36 | B | 5 | 36 |
| FIJI | C | 6 | 40 | C | 6 | 40 |
| FIJI | D | 7 | 20 | D | 7 | 20 |
Hi palindrome
If this is a one off project and the Excel you are shoing will not change, then you can do this
- Create a copy of the Query
- Rename one query to 2013 and the other 2014
- In 2013 delete the 2014 columns and vice versa
- In both tables delete the first row
- In both tables add a coloumn and enter the year in there
- Then Append both tables together
If this is a live Excel and is updated regulary, tell the owner if they want to visualise the data in Power BI then they need to format their Excel into Tabular format.
Thanks
Joe
If you found my answer helpful and it solved your issue, please accept as solution
1 Reply
- Joe_BarrySolution Sage
Hi palindrome
If this is a one off project and the Excel you are shoing will not change, then you can do this
- Create a copy of the Query
- Rename one query to 2013 and the other 2014
- In 2013 delete the 2014 columns and vice versa
- In both tables delete the first row
- In both tables add a coloumn and enter the year in there
- Then Append both tables together
If this is a live Excel and is updated regulary, tell the owner if they want to visualise the data in Power BI then they need to format their Excel into Tabular format.
Thanks
Joe
If you found my answer helpful and it solved your issue, please accept as solution