web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gantt Chart showing mu...
Power Apps
Unanswered

Gantt Chart showing multiple events per row

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm building off of @RonLar's awesome Gantt Chart at https://powerusers.microsoft.com/t5/Community-App-Samples/Gantt-like-Display-Using-Standard-Power-Apps-Controls/td-p/1241763. I'm trying to figure out how to display multiple events for the same person across their row over time. The first image is something @Mrkelley shared and is exactly what I'm looking for. The second is where I am at currently. I did distinct items for the names where they don't show up as individual rows per person but the events are gone. Thank you for any and all help!APT Screenshot 2022-09-29.pngGantt Screenshot.png

Categories:
I have the same question (0)
  • JoelAle Profile Picture
    26 on at

    Did you get it to work? I need the same type of Gantt chart. What I think of doing is creating a list of all the rows in the list and calculating the position thanks to the height of each row. Then when an item is to be inserted it gets the position from this created list.

    Let me know if you found another way to do this.

  • TRR Profile Picture
    13 on at

    Hallo, genau so etwas suche ich auch aktuell 😳

    Benötige falls sogar auf Stunden Basis. 

    Also 24 Stunden. 

    Vielleicht kannst du mir irgendwie helfen?

     

    LG TRR

  • vmsouza030 Profile Picture
    2 on at

    Is it possible to create this graph?

  • kdavies1966 Profile Picture
    on at

    Hi,

     

    I have an example working but with some unwanted limitations. What I did was create a collection from the underlying data and then using a GroupBy, adding repeating groups of columns called: titlex, startx and endx where x is a number from 1-20 as follows:

    GroupBy(collHolidayGantt, Requester, grpDATA),
    _events, CountRows(grpDATA),
    _title1, First(SortByColumns(grpDATA, "StartDate", SortOrder.Ascending)).Status,
    _start1, Max(DateDiff(DateFrom.SelectedDate, First(SortByColumns(grpDATA, "StartDate", SortOrder.Ascending)).StartDate, TimeUnit.Days)+1, 1),
    _end1, DateDiff(DateFrom.SelectedDate, First(SortByColumns(grpDATA, "StartDate", SortOrder.Ascending)).EndDate, TimeUnit.Days)+1,
    _title2, If(CountRows(grpDATA)>1, Last(FirstN(SortByColumns(grpDATA, "StartDate", SortOrder.Ascending), 2)).Status, "NA"),
    _start2, If(CountRows(grpDATA)>1, DateDiff(DateFrom.SelectedDate, Last(FirstN(SortByColumns(grpDATA, "StartDate", SortOrder.Ascending), 2)).StartDate, TimeUnit.Days)+1),
    _end2, If(CountRows(grpDATA)>1, DateDiff(DateFrom.SelectedDate, Last(FirstN(SortByColumns(grpDATA, "StartDate", SortOrder.Ascending), 2)).EndDate, TimeUnit.Days)+1),
    etc.
     
    The limitations are that it only allows 20 events per line (and adding more is a pain) plus that overlapping events will not display properly (I haven't figured out a solution for that yet).

    On the other hand, it's pretty quick lo load and doesn't look too bad. Let me know if you figure out any tweaks to improve it.
     
    HolidayGantt.jpg
  • kdavies1966 Profile Picture
    on at

    Hmmmm, I think my reply was marked as spam somehow so I will try again without posting the code directly into the thread.

    I have a working solution to this issue but with unwanted limitations (number of events per line.

    What I did was create a collection of all the holiday requests, then use a groupby with addcolumns to display it in a gallery.

    kdavies1966_0-1718809830274.png

    I used the same logic as @RonLars to build the bars in the chart and just change the colour based on the type/status of the request record.

    Here's what the finished chart looks like

    kdavies1966_1-1718809880310.png

     

    Adding more entries per line (such as creating a year planner view) is a bit of a pain and it's not the easiest code to read/debug but it does work for my purposes at the moment.
    Let me know if you come up with any improvements.

    Best,

    Keith

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard