Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Noah
Regular Visitor

Stacked Column Chart with Multiple Columns of Data

Hello everyone.

 

I am struggling to find out of Power BI is capable of doing a specific clustered column with the following columns (you can find them in the shared sample excel spreadsheet):

  1. List of SKUs
  2. Stores
  3. Lead times for process 1
  4. Lead times for process 2
  5. Lead times for process 3
  6. Lead times for process 4
  7. Total process time (sums per row)

Noah_0-1724177963603.png

 

The idea is to have a stacked column chart with multiple columns. Each column would represent the average lead times for each process, with side-by-side columns for each Store. For example, the first 2 columns would represent the average Lead times for Process 1 for Store A and Store B.

 

My actual dataset is structured exactly like in the sample spreadsheet and I can modify it to be structured differently if necessary.

 

Thanks for any help anybody can provide!

2 ACCEPTED SOLUTIONS
Irwan
Super User
Super User

hello @Noah 

 

is this what you are looking for?

Irwan_1-1724207075910.png

 

1. you need to unpivot your sample data abov using power query.

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Vc67DcAgDATQXVxTYEP4lMkKKRH7rxFfbEtJ4RPwDsRadDMlOnW6DleNghHaSVEcGS0eGjiRYVpcjx9Ow+ooWDAq+aPYX4CJ6H63sGkLlai8n8qm3bXFw+y4Hw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [SKU = _t, Store = _t, #"Process 1" = _t, #"Process 2" = _t, #"Process 3" = _t, #"Process 4" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"SKU", type text}, {"Store", type text}, {"Process 1", Int64.Type}, {"Process 2", Int64.Type}, {"Process 3", Int64.Type}, {"Process 4", Int64.Type}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"SKU", "Store"}, "Attribute", "Value")
in
#"Unpivoted Columns"

Irwan_2-1724207132253.png

 

2. Visualize your data (not sure if you want to do in stacked column since it will show 100% because there is only one value in each column visual)

 

If this not what you are looking for, please provide your sample data and/or your excel chart as PBI experts mentioned here.

 

Hope this will help.

Thank you.

View solution in original post

Noah
Regular Visitor

After I originally responded, I made the mental connection and figured out that Power BI can unpivot my dataset. That is exactly what I needed.

 

Thank you very much!

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi, @Noah 

I create a sample table:

vyohuamsft_1-1724209677871.png

 

Then unpivot the column in Power Query:

vyohuamsft_2-1724209722280.png

vyohuamsft_3-1724209808730.png

 

Create a stacked column chart and put fields in it:

vyohuamsft_4-1724209888687.png

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Irwan
Super User
Super User

hello @Noah 

 

is this what you are looking for?

Irwan_1-1724207075910.png

 

1. you need to unpivot your sample data abov using power query.

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Vc67DcAgDATQXVxTYEP4lMkKKRH7rxFfbEtJ4RPwDsRadDMlOnW6DleNghHaSVEcGS0eGjiRYVpcjx9Ow+ooWDAq+aPYX4CJ6H63sGkLlai8n8qm3bXFw+y4Hw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [SKU = _t, Store = _t, #"Process 1" = _t, #"Process 2" = _t, #"Process 3" = _t, #"Process 4" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"SKU", type text}, {"Store", type text}, {"Process 1", Int64.Type}, {"Process 2", Int64.Type}, {"Process 3", Int64.Type}, {"Process 4", Int64.Type}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"SKU", "Store"}, "Attribute", "Value")
in
#"Unpivoted Columns"

Irwan_2-1724207132253.png

 

2. Visualize your data (not sure if you want to do in stacked column since it will show 100% because there is only one value in each column visual)

 

If this not what you are looking for, please provide your sample data and/or your excel chart as PBI experts mentioned here.

 

Hope this will help.

Thank you.

Noah
Regular Visitor

After I originally responded, I made the mental connection and figured out that Power BI can unpivot my dataset. That is exactly what I needed.

 

Thank you very much!

Noah
Regular Visitor

Yes! That's exactly how I need the graph to look!

 

Would I just replace each #"Process X" with my actual column names? 

lbendlin
Super User
Super User

Consider using a ribbon chart without the ribbons. 

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

ryan_mayu
Super User
Super User

what's the expected output what you want? could you pls also provide that in excel? And it's better that you can also create the chart in excel as well.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors