Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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 name | Days in Stage 1 | Days in Stage 2 | Days in Stage 3 | Days in Stage 4 | Days in Stage 5 |
Project 1 | 50 | 50 | 50 | 50 | 50 |
Project 2 | 40 | 20 | 30 | ||
Project 3 | 44 | 20 | 30 | 0 | 20 |
Project 4 | 50 | 20 | 10 | 10 | |
Project 5 | 20 | 0 | 0 | 50 | 100 |
Project 6 | 10 | 0 | 20 | 20 | 20 |
Project 7 | 20 | 10 | |||
Project 8 | 4 |
The Excel equivalent of the PowerBI measures are:
Count in Stage 1 | Count in Stage 2 | Count in Stage 3 | Count in Stage 4 | Count in Stage 5 | |
8 | 7 | 6 | 5 | 4 | |
AVG | 29,8 | 17,1 | 23,3 | 26,0 | 47,5 |
The way it should look like (done in Excel):
As usual, help is very much appreciated.
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.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
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!