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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Answered

Create Gantt Chart

(0) ShareShare
ReportReport
Posted on by 691

Hello, I am trying to create a diagram similar to the picture below.

s44_0-1659362916928.png

 

But I can't, when I try I don't have the colored bars displayed.

I have something like that :

s44_1-1659363217038.png

 

 

All properties that I have :

 

Indicator Label : 

s44_2-1659363251043.png

 

Fill : If(ThisItem.Status.Value="Not Started";White;If(ThisItem.Status.Value="Active";Orange;If(ThisItem.Status.Value="Delayed";Red;If(ThisItem.Status.Value="Completed";Green;Gray))))

X : Value(StartDays.Text) * 'Gantt Tasks_1'.Width/365

 

EndDays Label :

s44_3-1659363453595.png

Text : DateDiff(Date(Year(Now());1;1); DateValue(EndDate.Text))+1

 

EndDate Label :

s44_4-1659363505307.png

 

StartDays Label :

s44_5-1659363564101.png

 

DateDiff(Date(Year(Now());1;1); DateValue(StartDate.Text))+1

 

StartDate Label :

s44_6-1659363599909.png

 

Can you help me please ? Thanks in advance 😞 !

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    Hi,

     

    To save you some time - Someone has already gone through the trouble of doing this so you don't have to - you can get it from the community samples here and then tweak it for your needs:

     

    Gantt-like Display Using Standard Power Apps Contr... - Power Platform Community (microsoft.com)

     

    Cheers,

  • Hii_iii Profile Picture
    691 on at

    I saw it but I didn't understand. His tutorial is way too complex for me 😕

  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    oh, well he included the actual .msapp so that you could copy out the contents and modify it for your own needs rather than a full tutorial

     

    You can look at this tutorial for a step-by-step:

    GanttChart Using Microsoft PowerApps (c-sharpcorner.com)

  • Hii_iii Profile Picture
    691 on at

    As you can see in my post, this is exactly the tutorial I followed but it doesn't work as you can see 😕 @iAm_ManCat 

  • Verified answer
    iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    Yeah, that's not a great tutorial to be honest, their naming convention is poor and they have way too many unnecessary items.

     

    I will put together a blog on this sometime soon, but there's the test .msapp I created as a proof of concept - you can use File> Open to browse for this .msapp file and then open it - those few labels and galleries are what you need for a basic gantt - feel free to copy them out of that app into your own.

     

    image.png

     

    Any issues copying it to your App then please let me know,

     

    Ciao,

  • Hii_iii Profile Picture
    691 on at

    s44_2-1659435361347.png

     

     

    I recovered the file but I can't adapt it with my SharePoint data :c @iAm_ManCat 

  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    If you select the error notification it will take you to the formula that is erroring - this will likely be the name of the list, the names of the startdate and enddate columns, the status, and the description(title).

     

    You will need to change these to match the naming and column types of your datasource

  • Hii_iii Profile Picture
    691 on at

    It's work !

  • Hii_iii Profile Picture
    691 on at

    It's work thank you ! C:

  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    Excellent, glad I could help!

     

    One minor fix:

    lblIndicator.X

    change to:

    Value(
     DateDiff(
     Date(
     Year(Now()),
     1,
     1
     ),
     ThisItem.StartDate
     ) + 0
    )* (galBodyMonths.Width / 365)

    and 

    lblIndicator.Width:

    (Value(
     DateDiff(
     Date(
     Year(Now()),
     1,
     1
     ),
     ThisItem.EndDate
     ) + 1
    ) - Value(
     DateDiff(
     Date(
     Year(Now()),
     1,
     1
     ),
     (ThisItem.StartDate + 0)
     )
    )) * (galBodyMonths.Width / 365)

     

    This should fix them starting too far from left and the gaps between items 🙂

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard