Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have a data source with many columns, each indicating a status. For all columns, the possible types of statuses are the same. What I want to do is merge all the responses for each column into a single column, and make my column headers into a variable. I want to do what the melt function achieves using the reshape2 package in R.
Here's an example (except I have about 30 columns):
Date | Car1 | Car2 | Car3 | Car4 |
1/22/18 | FAST | SLOW | FAST | SOMEWHAT |
1/31/18 | SLOW | SLOW | FAST | SLOW |
Here's how I want to transform the data:
Date | Car | Speed |
1/22/18 | Car1 | FAST |
1/22/18S | Car2 | SLOW |
1/22/18 | Car3 | FAST |
1/22/18 | Car4 | SOMEWHAT |
1/31/18 | Car1 | SLOW |
1/31/18 | Car2 | SLOW |
1/31/18 | Car3 | FAST |
1/31/18 | Car4 | SLOW |
Anyone have any ideas????
Solved! Go to Solution.
That seems like a simple unpivot. Select your first column and unpivot other columns in Power Query.
That seems like a simple unpivot. Select your first column and unpivot other columns in Power Query.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |