Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
In matrix, the column name in blue background has data in database, and that of in gray is measure(percentage), so the original data is only a table.
If add a header which above them, how to add a column in table as a row in matrix like that?
Solved! Go to Solution.
Hi @Anonymous ,
I created a sample pbix file(see attachment), please check whether that is what you want.
1. Unpivot all columns whose names start with “M” in Power Query Editor
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WyixJzTUwVNJRMgViIyg2hmITpVgdqBIjqBIzIDYES0GUmCKUGCOZYopkEpISE6gJyNJmYDZciSmSEhMobQpWCldihmSJCZQNcVNsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [item = _t, M = _t, #"M+1" = _t, #"M+2" = _t, #"M+3" = _t, #"M+4" = _t, #"M+5" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"item", type text}, {"M", Int64.Type}, {"M+1", Int64.Type}, {"M+2", Int64.Type}, {"M+3", Int64.Type}, {"M+4", Int64.Type}, {"M+5", Int64.Type}}),
#"Unpivoted Only Selected Columns" = Table.Unpivot(#"Changed Type", {"M", "M+1", "M+2", "M+3", "M+4", "M+5"}, "Type", "Value")
in
#"Unpivoted Only Selected Columns"
2. Create a matrix visual as below
In addition, you can also refer the following links to get it.
Power BI Unpivot (From Columns To Rows)
Convert multiple column data into a column with multiple rows
If the above one is not your expected one, please provide some sample data (exclude sensitive data) and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file with me. You can refer the following thread to upload your file in the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @Anonymous ,
I created a sample pbix file(see attachment), please check whether that is what you want.
1. Unpivot all columns whose names start with “M” in Power Query Editor
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WyixJzTUwVNJRMgViIyg2hmITpVgdqBIjqBIzIDYES0GUmCKUGCOZYopkEpISE6gJyNJmYDZciSmSEhMobQpWCldihmSJCZQNcVNsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [item = _t, M = _t, #"M+1" = _t, #"M+2" = _t, #"M+3" = _t, #"M+4" = _t, #"M+5" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"item", type text}, {"M", Int64.Type}, {"M+1", Int64.Type}, {"M+2", Int64.Type}, {"M+3", Int64.Type}, {"M+4", Int64.Type}, {"M+5", Int64.Type}}),
#"Unpivoted Only Selected Columns" = Table.Unpivot(#"Changed Type", {"M", "M+1", "M+2", "M+3", "M+4", "M+5"}, "Type", "Value")
in
#"Unpivoted Only Selected Columns"
2. Create a matrix visual as below
In addition, you can also refer the following links to get it.
Power BI Unpivot (From Columns To Rows)
Convert multiple column data into a column with multiple rows
If the above one is not your expected one, please provide some sample data (exclude sensitive data) and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file with me. You can refer the following thread to upload your file in the community. Thank you.
How to upload PBI in Community
Best Regards
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.