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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Stacked colum charts

Hi, i am trying since days 😅 to have a stacked colum charts where the data are dates. In the specific: i want to report the trend that the expected end date projects varies. For each project i have different end dates reported at the end of each month. What i need is with stacked colum chart to show the trend per project. It works perfectly in xlxs but i cannot make it work in Power BI....help! 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

In Stacked column chart or Clustered column chart, Date is not available in y-axis.

Please try to use Gantt visual, or try to use R visual.

Gantt:

gantt.PNG

 

R:

library(ggplot2)
EndDate2 <- as.Date(dataset$EndDate, "%Y-%m-%d")
EndDate3<-format(EndDate2,"%m-%d")
Month2<-factor(dataset$Month, levels = month.name)
ggplot(dataset, aes(x = Month2, y = DateDiff_Months, fill=Project, label=EndDate3)) 
     + geom_bar(position="dodge", stat="identity")
     +geom_text(position = position_dodge(width= 1))
     +theme(legend.position = "none",axis.title= element_blank(),axis.text.y = element_blank())

r.PNG

 

BTW, .pbix file attached.

 

 

 

Best Regards,

Icey

 

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

View solution in original post

8 REPLIES 8
Icey
Community Support
Community Support

Hi @Anonymous ,

 

In Stacked column chart or Clustered column chart, Date is not available in y-axis.

Please try to use Gantt visual, or try to use R visual.

Gantt:

gantt.PNG

 

R:

library(ggplot2)
EndDate2 <- as.Date(dataset$EndDate, "%Y-%m-%d")
EndDate3<-format(EndDate2,"%m-%d")
Month2<-factor(dataset$Month, levels = month.name)
ggplot(dataset, aes(x = Month2, y = DateDiff_Months, fill=Project, label=EndDate3)) 
     + geom_bar(position="dodge", stat="identity")
     +geom_text(position = position_dodge(width= 1))
     +theme(legend.position = "none",axis.title= element_blank(),axis.text.y = element_blank())

r.PNG

 

BTW, .pbix file attached.

 

 

 

Best Regards,

Icey

 

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

Anonymous
Not applicable

Hi Icey!

 

this is perfect, however a bit to advanced for me to replicated...expecially the connection bit between the data 😅..

this looks very cool however i cannot find a way to add data labels..how come? for each bar i would like the label for the end date...

 

can you help me?

 

Gant endate.PNG

Icey
Community Support
Community Support

Hi @Anonymous ,

 

For as TimeLine visual, change the data format of [EndDate] column first, and then put it on "Overlay" filed. Finally, change the color and position in "Overlay type options".

overlay.gif

 

In addition, I created "MonthTable" and "ProjectTable" to sort the order of "Month" and "Project". But it doesn't work in this visual. 

 

 

Best Regards,

Icey

 

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

Anonymous
Not applicable

Hi Acey this is super cool, i just need to add all the data and see if i can replicate what you did, still i have some issues to do exactly what you did. thanks a lot!

amitchandak
Super User
Super User

@Anonymous , not very clear, You should able to plot end date and number project closed. In case you have two dates like start and end, you can join them with a same date table and work using userelation

example

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit

 

what is not clear?

 

  1. what i want to see in term of graph
  2. or the data i shared

let me know so i can clarify

 

thanks

 

 

Pragati11
Super User
Super User

Hi @Anonymous ,

 

In order to get your query answered correctly, you will have to add details like sample data, chart you are trying to replicate from excel, etc.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Hi Pragati

 

here are my data:

 
 

Power BI issue.PNG

for example project called Sabre, its expected end date changed (from reporting month Feb to reporting month May) from April 2020 to Dec 2020, i need to see 4 stacked columns for each expected end date and their lenght has to varies based on the time. here is what i got in xlsx for sabre 

 

SABRE end date.PNG

this is exactly what i am trying to build in Power BI, but i can't cause the format of the data is date and whilst i can change the format in xlxs, in Power BI i cant, it automatically read those as dates...

 

i tried everything i could think of but no luck..🙄. any help?

 

thank you

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.