It looks like you've got it from my suggestion if you just add a sorting step (see 4 below).
- Unpivot the ASPECT columns
- Concatenate ASPECT and CATEGORY as a new column
- Remove ASPECT and CATEGORY column
- Sort by the concatenated column
- Transpose the table
- Promote headers
Full M query:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnYMMVTSUTKxVAWSxuaqSrE6YEEjINfUECRoZAgXNAZxzUCChghBE5B2Y5AgQrcpkGdpChIzAwnGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CATEGORY = _t, ASPECT1 = _t, ASPECT2 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"CATEGORY", type text}, {"ASPECT1", Percentage.Type}, {"ASPECT2", Percentage.Type}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"CATEGORY"}, "ASPECT", "Value"),
#"Added Custom" = Table.AddColumn(#"Unpivoted Columns", "ASPECT_CAT", each [ASPECT] & "; " & [CATEGORY], type text),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"ASPECT_CAT", "Value"}),
#"Sorted Rows" = Table.Sort(#"Removed Other Columns",{{"ASPECT_CAT", Order.Ascending}}),
#"Transposed Table" = Table.Transpose(#"Sorted Rows"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
#"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"ASPECT1; CAT1", Percentage.Type}, {"ASPECT1; CAT2", Percentage.Type}, {"ASPECT1; CAT3", Percentage.Type}, {"ASPECT1; CAT4", Percentage.Type}, {"ASPECT1; CAT5", Percentage.Type}, {"ASPECT2; CAT1", Percentage.Type}, {"ASPECT2; CAT2", Percentage.Type}, {"ASPECT2; CAT3", Percentage.Type}, {"ASPECT2; CAT4", Percentage.Type}, {"ASPECT2; CAT5", Percentage.Type}})
in
#"Changed Type1"