Forum Discussion
Converting rows to columns in Power BI
Does anyone know to make the right table turn into table on the left side where if the employee ID's section name is there, it will change from rows in a column to new columns
Hello,
It looks like you're probably looking for the unpivot functionality in Power Query. See this article in the documentation for more details. Please let me know if you have any follow up questions after taking a look at the link. 😄
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
3 Replies
- Wilson_
Memorable Member
Hello,
It looks like you're probably looking for the unpivot functionality in Power Query. See this article in the documentation for more details. Please let me know if you have any follow up questions after taking a look at the link. 😄
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)- AnonymousNot applicable
Step 1: I've unpivot the selected column
Step 2: I pivot-ed the Value column in Step 1 and now the final looks of the table became like this. How do I make it into Table No. 3?- Wilson_
Memorable Member
Hello,
I found a different thread that covers your new scenario exactly. They wrote a function to flatten the rows like you want. You may need to replace all the 0s with nulls, either as separate steps (right click each column and click Replace Value) or adding it into their function when you modify it to fit your use case). 😄