Forum Discussion

palindrome's avatar
palindrome
New Member
2 years ago
Solved

power Querry

Experts

 

I have below table. How do i unpivot this

 

Year201320132013201420142014
CountryNameFirst dayLast dayNameFirst dayLast 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

  • 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