
Explanation
Text Description automatically generated with medium confidence

Step 1: Select Use Header as First Row.
Step 2: Select Department and Product and Unpivot Other Columns
Unpivot Other Columns: This command unpivots unselected columns. Use this command in a query when not all columns are known. New columns added during a refresh operation are also unpivoted.
Step 3: Rename the Attribute column to Year and the Value column to Revenue.
You might want to unpivot data, sometimes called flattening the data, to put it in a matrix format so that all similar values are in one column. This is necessary, for example, to create a chart or a report.
Chart Description automatically generated with medium confidence

When you unpivot, you unpack the attribute-value pairs that represent an intersection point of the new columns and re-orient them into flattened columns:
Values (in blue on the left) are unpivoted into a new column (in blue on the right).
Attributes (in green on the left) are unpivoted into a new column (in green on the right) and duplicates are correspondingly mapped to the new Values column.
Reference:
https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f588221c70