cancel
Showing results for 
Search instead for 
Did you mean: 
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 Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

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!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors