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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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)

Anonymous
Not applicable

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.