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.
How to create a 'clustered bar chart' for aggregated data that is using the same row with three different attributes.
For some reason I cannot find a way for the 'series/shared axis' to be split by column attribute. (It will only use one column attribute at a time, like 'Planned', but not all three).
Example dataset:
Title | Value | Plan | Actual | Forecast |
Row 1 | 10 | Jan 2020 | Jan 2020 | |
Row 2 | 15 | Feb 2020 | Feb 2020 | |
Row | 12 | Feb 2020 | Mar 2020 |
Something like this would be the result:
Solved! Go to Solution.
This unpivot transform should help you to get your data into a usable format.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCsovVzBU0lEyNAASXol5CkYGRmhMBaVYHYhCI5BCUyDhlpqEkEXiQhWClBlhKvNNLIIqiwUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Title = _t, Value = _t, Plan = _t, Actual = _t, Forecast = _t]),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Title", "Value"}, "Attribute", "Value.1")
in
#"Unpivoted Other Columns"
Hi @trevorg
If the above posts help. plz kindly mark it as answer to help others find it more quickly.
@trevorg , with multiple columns you can not have a legend.
If you want these columns as a legend , you need to unpivot your data.
https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/
This solution worked for me. Thank you.
I cannot mark it as accepted, for some reason the javascript is being blocked on my work browser.
This unpivot transform should help you to get your data into a usable format.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCsovVzBU0lEyNAASXol5CkYGRmhMBaVYHYhCI5BCUyDhlpqEkEXiQhWClBlhKvNNLIIqiwUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Title = _t, Value = _t, Plan = _t, Actual = _t, Forecast = _t]),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Title", "Value"}, "Attribute", "Value.1")
in
#"Unpivoted Other Columns"
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 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |