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 Apps
Unanswered

Gantt Chart

(0) ShareShare
ReportReport
Posted on by

I have created a Gantt chart which filters and displays lines from a SP list based on certain criteria. I am trying to make a version which only has one line per same person rather than having a new line for each person with the same name. Can anyone think of a way of achieving this? So basically I need to show multiple lines in the SP list on the same row of a gallery? 

 

Eg. 

 

Person A has a line for January 1st to January 3rd. 

Person A has another line for January 10th to January 14th. 

 

Person B has a line for January 1st to January 3rd.

Person B has a line for January 10th to January 14th. 

 

I want the Gallery to show Person A on same line and Person B on a line underneath rather than them having 4 lines in total?

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @jed76 ,

     

    I had an idea to have a vertical gallery and then to insert a flexible width gallery. You can then build the controls inside the nested gallery, but only have them be visible if they match ThisItem.Person.

     

    Unfortunately there's not such a thing as a flexible width gallery, so for now this will only work if you change the orientation to vertical.

     

    An idea for a flexible width gallery has been posted, so please upvote to speed up implementation:

     

    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Horizontal-Flexible-Width-Gallery/idi-p/540516

  • Abhilash_Swain Profile Picture
    901 on at

    Could you please share below details to check.

    1 sample data to match your product

    2 A sample diagram how you want the visuals .

     

  • jed76 Profile Picture
    on at

    I will do - many thanks. 

    it’s basically to be able to have flexible width bars on the same line rather than there having to be a new line for each set of data. Many thanks. 

  • jed76 Profile Picture
    on at

    Screenshot 2022-08-21 at 16.38.09.png

    @Abhilash_Swain This is the kind of thing. I would like both rows on the same line so that each task for the same person is not duplicated vertically. Only a new line is created when the person name is different. 

  • Abhilash_Swain Profile Picture
    901 on at

    Hi @jed76 ,
    Got it. Let me try to replicate the same and share the update. I have a working Gantt chart which is based on task instead of the user. Let me try to change it to showcase as per your requirement.

  • Abhilash_Swain Profile Picture
    901 on at

    Hi @jed76 ,
    I could able to do a workaround. However, there are few limitations.


    Limitations:- 

    > Cannot create dynamic buttons to accommodate all tasks. So it would be best if you always predefined the no of buttons /controls which will act like a colored bar in Gantt.

     

    My example:- Tried to show you 2 tasks side by side.

    Abhilash_Swain_0-1661161107329.png

     

    Steps:- 

    1> Use GroupBy to group your collection based on assigned employees. Make sure you use the filtered collection to limit the number of assigned jobs/tasks.

    Abhilash_Swain_2-1661161442472.png

     

    2> Once you GroupBy, The Collection will look like this.

    Abhilash_Swain_1-1661161413247.png

    3> In the Button Width, use First/FirstN/Last,lastN to find the correct task Start and target dates.
    Button- 1 For 1st Task

    Abhilash_Swain_3-1661161598961.png

    Button- 2 For 2nd Task

    Abhilash_Swain_4-1661161621185.png

    (Please ignore the red underlined variables. I use them to accommodate the theme size controls)

     

    Similarly, You need to put the X coordinates for buttons so that they will appear nicely.
    (As you are aware of how to place the X coordinates and width, I am not explaining them)


    Please give me a Thumbs up if I answered your question and mark it as a solution to help others.

    Thanks

    Abhi (LinkedIn)

     

  • jed76 Profile Picture
    on at

    thank you very much! I will see if I can replicate it with my version. I use a TaskType column to filter the Gantt chart. When TaskType is =1 it only shows lines relevant to each person. Hopefully I can use your method to put each tasks start and end date side by side rather than there being a new line each time per person?

  • Abhilash_Swain Profile Picture
    901 on at

    Hi @jed76 ,
    I used it to validate my display widths. However, you can use anything based on your requirement.

    Please accept the response as the solution, if it meets your requirements.

     

  • jed76 Profile Picture
    on at

    Just testing this out and I keep getting "The collection has some invalid arguments" Incompatible type. The collection can't contain values of this type. 

     

    My syntax is ClearCollect(colWW,GroupBy(colWWUsers,"CREWNAMETEXT0","MyWWGroup"));

     

    Where CREWNAMETEXT0 is the person column listing the assigned person and MyWWGroup is the column in which to store the group? Both collections are executed on the VISIBLE of the page. colWW and colWWUsers are both collections from the main SP List?

  • Abhilash_Swain Profile Picture
    901 on at

    Hi @jed76,

    Could you please check if you are adding any record instead of text?
    A screenshot of the error may help to understand it further.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard