cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Nedix
Helper I
Helper I

Stacked column chart (yet again)

Hello all, 

 

I have a problem with displaying stacked columns based on y data and I did watch some videos on YT and I also read some of the threads on this forum to no avail. 

Problem statement: I have a table with projects. They go through different stages and they spend "x" days in each stage. What I would like to see is how many projects stayed for how long on average in each stage. I can do this in Excel and other systems but for some reason I can't do it in Power BI. Aside the columns you will see in the sample data set, I also created measures for Average days in each stage and Count of projects in the respective stage. 

 

Sample data set

Project nameDays in Stage 1 Days in Stage 2Days in Stage 3Days in Stage 4Days in Stage 5
Project 15050505050
Project 2402030  
Project 3442030020
Project 450201010 
Project 5200050100
Project 6100202020
Project 72010   
Project 84    

 

The Excel equivalent of the PowerBI measures are:

 Count in Stage 1Count in Stage 2Count in Stage 3Count in Stage 4Count in Stage 5
 87654
AVG29,817,123,326,047,5

 

The way it should look like (done in Excel):

 

Nedix_0-1679673781286.png

 

As usual, help is very much appreciated. 

 

2 REPLIES 2
HotChilli
Super User
Super User

If you Unpivot all the Days columns in Power Query, the measures will be simple.

 Attribute on the x-axis.

Drag Value on to Y-axis twice (one will be count and one will be average)

@HotChilliI don't really understand what you're saying. The Days in Stage x columns are calculated columns so they are created within PowerBi, they are not imported, meaning I cannot unpivot them. 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors