Variables are Stored in Both Rows and Columns
Tidy Data Rule(s) Broken: Each variable forms a column, and Each observation forms a row
Select the "cols-and-rows" table from the left pane.
ADJUST HEADERS:
- Sometimes Power Query does not automatically detect that the table has headers. Click on the little table icon on the top left-hand corner of your data table. Select “Use First Row as Headers” from the dropdown menu.
Click for Navigation help
UNPIVOT COLUMNS:
Several of the headers in this table are dates. Dates are a value which can be stored under a column header called “Date” or similar depending on the observation
- Select all the columns with dates as headers. To so this you may either
- Selecting all columns by pressing CTRL A (for Windows) or Command A (for Mac) and unselecting the “librarian” and “Measure” by holding down CTRL or Command and clicking on the headers.
- OR hold down CTRL or Command and click on all the headers.
- All of the date headers should now be highlighted. Right click on any of the highlighted headers. From the drop-down, select unpivot columns.
Click for Navigation help
PIVOT COLUMN:
The “Measure” column is different appointment variables for Librarian Reference. These should be headers instead whose values are currently in the column “Value”.
- Select the “Measure” column by clicking on the header. The column should now be highlighted.
- In the top pane, navigate to the Transform column. In the Any Column section select Pivot Column.
- In the Pivot Column window, select “value” from the drop down menu. Make sure that in the Advanced Options: Aggregate Value Function, “Don’t Aggregate” is selected . These are the values that will be under the new headers.
Click for Navigation help
RENAME AND CHANGE TYPE:
- The column that holds the dates is still called “Attribute”. Change the name to “Date” by double clicking on the header.
Click for Navigation help
NEXT STEP: Should be Multiple Tables