cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

PowerBI - Clustered bar chart for time phased data with mutiple column attributes.

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:

 

TitleValuePlanActualForecast
Row 110Jan 2020Jan 2020 
Row 215Feb 2020 Feb 2020
Row12Feb 2020 Mar 2020

 

Something like this would be the result:

 

 ClusteredBarChartExample.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: PowerBI - Clustered bar chart for time phased data with mutiple column attributes.

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"

View solution in original post

4 REPLIES 4
Highlighted
Super User II
Super User II

Re: PowerBI - Clustered bar chart for time phased data with mutiple column attributes.

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"

View solution in original post

Highlighted
Super User IV
Super User IV

Re: PowerBI - Clustered bar chart for time phased data with mutiple column attributes.

@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/

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Community Support
Community Support

Re: PowerBI - Clustered bar chart for time phased data with mutiple column attributes.

Hi @trevorg 

 

If the above posts help. plz kindly mark it as answer to help others find it more quickly.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Highlighted
New Member

Re: PowerBI - Clustered bar chart for time phased data with mutiple column attributes.

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.

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors