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 / Complete task Chart - ...
Power Apps
Unanswered

Complete task Chart - Monthly overview

(0) ShareShare
ReportReport
Posted on by 81

Hi! I don't know how to word this so I will just try and explain what I would like the end result to be. 

 

I have a task members must complete daily, recorded in a SharePoint list with date complete. I want to be able to display this by showing every day and either a count or icon if the member completed it that day or not. So they can visually see missed days, the sharepoint list only have success days. I think I might be able to do a lookup? I am sorry I am just lost on how to explain this. 

chart.png

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    You can use the calendar template if you like to get a visual calendar then add a count to the little dod in the calendar that shows it there is an event or not.

    There are lots of ways to achieve what you want.

    You'll need a collection of dates, from and to a date, then you can grab all the sharepoint items that equal those dates.
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @HallieG ,

    Could you please share a bit more about your scenario?

    Do you want to design a Chart based on the Table you provided within a PowerApps app?

     

    If you want to design a Chart based on the Table you provided within a PowerApps app to show the Complete task, I think the Column chart control could achieve your needs. I have made a test on my side, please take a try with the following workaround:

    The data structure of my Excel table as below:2.JPG

    App's configuration as below:

    1.JPG

    1. Add Column chart control in your app.

    2. Set the Items property to following:

    TaskCompleted  /* <-- TaskCompleted represents my Excel table, you need to type your own SP List data source or Excel table here */

    set the Labels property to Date column, set the Series1 property to Completed column.

     

    Please consider take a try with above solution, check if it could help in your scenario.

     

    Best regards,

  • HallieG Profile Picture
    81 on at

    So my issue is I don't collect dates on the days they don't complete the task. I don't know how to get the None represented dates to show up. 

     

    my data will only have 8/5/2019, 8/6/2019, 8/8/2019, 8/8/2019, and 8/8/2019. 

     

    Here are some screenshots to further explain what my thoughts are. I can't figure out how to get my SharePoint list into the Calendar. Any advice or suggestion for anything like these will be greatly appreciated. 

    month dots.pngmonth count.png

     

     

  • Luke_Timmins Profile Picture
    176 on at
    Hi HallieG,

    Did you resolve your issue or do you still need help? If you require help I can give you some steps to help you overcome your issue.

    Thanks
    Luke
  • HallieG Profile Picture
    81 on at

    I would love some more help! I can't figure this out. 

  • Luke_Timmins Profile Picture
    176 on at

    @HallieG 

     

    ok since I just resolved a  issue I was having  I am feeling generous so I will explain in detail how this works. Beware it is quite involved. 

     

    When you create the calendar page it is linking to your outlook calendar. Essentially it is copying your outlook events into a collection and then using that collection to display the events in a gallery. 

     

    Our aim is to populate the collection with data from SharePoint or any other data source. The one constraint we have is that we need to have a date field in our data source. 

     

    So the first step is to setup our data source connection ensuring one of our fields (columns) is a date. 

     

    Next proceed to create your new screen  using the calendar template. 

    image.png

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    The page will generate

     

    The dropdown shows a list of outlook calendars you have assigned to your user account. If you select the dropdown list and then the OnSelect property

    image.png

     

     

     

     

     

    you should notice a formula like this:

     

    /*retrieves calendar events for all days in current month view and selected calendar 
    _minDate and _maxDate act as markers to prevent duplicate data collection*/ 
    If(IsBlank(_userDomain), 
    	UpdateContext({_showLoading: true}); 
    	Set(_userDomain, Right(User().Email, Len(User().Email) - Find("@", User().Email))); 
    	Set(_dateSelected, Today()); 
    	Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), Days)); 
    	Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days)); 
    	Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days)) 
    ); 
    Set(_calendarVisible, false); 
    UpdateContext({_showLoading: true}); 
    Set(_myCalendar, dropdownCalendarSelection1.Selected); 
    Set(_minDate, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days)); 
    Set(_maxDate, DateAdd(DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days), 40, Days)); 
    ClearCollect(MyCalendarEvents, Office365.GetEventsCalendarViewV2(_myCalendar.Name, Text(_minDate, UTC), Text(_maxDate, UTC)).value); 
    UpdateContext({_showLoading: false}); 
    Set(_calendarVisible, true)

    not the most friendly I know. 

     

    So the line which is important here is this one:

     

    ClearCollect(MyCalendarEvents, Office365.GetEventsCalendarViewV2(_myCalendar.Name, Text(_minDate, UTC), Text(_maxDate, UTC)).value); 

    This is the line which populates a collection called MyCalendarEvents with a list of event from the selected calendar in the dropdown list. It is also filtering the calender events to a range that is displayed on screen i.e. the calendar month plus a few days either side. 

    Note:  the page works by populating a collection with one month plus a few days worth of events that are on display. When you navigate through different months we are updating the collection each time. 

     

    This is the line of code we need to change. We want to change it so your data is coming from a SharePoint list. your code should be something like this. 

    ClearCollect(MyCalendarEvents, 
    Filter(SHAREPOINTLISTNAMEHERE, DATECOLUMNNAME HERE >= _minDate && DATECOLUMNNAME <= _maxDate))

    This will populate the calendar events collection with events for the month on screen. 

     

    you can now remove the following line

    Set(_myCalendar, dropdownCalendarSelection1.Selected); 

    this line is used when getting calendar events from your outlook calendar. 

     

    Next step

     

    you want to copy all of the formulas from the onselect and paste it into the onvisible property of the page. This is so we can delete the dropdown list and have the calendar automatically load when you navigate to the page. When you have moved the formulas you can delete the dropdown list. 

     

    you should now have the following:

    1- no dropdown on screen

    2- the corrected formula set for the onvisible property of the page. 

    image.png

     

     

     

     

     

     

     

     

     

     

     

    if you hold alt on your keyboard and navigate to another page and back you should see the calendar loads. 

     

    image.png

    You will notice some of the controls are miss aligned, this is because the ms template has the location of these controls based on the location of the dropdown we deleted. So  move them as desired. 

     

    image.png

     

    Next step

    We need to update the navigation controls, the event indicator and the event details below the calendar. 

     

    Navigation Controls

    Each navigation control has an onselect event. The event basically calculates the next view and collects the events within the range. The left navigation control has an onselect property of: 

     

     

    /*changes month view to previous month*/
     
    Set(_firstDayOfMonth, DateAdd(_firstDayOfMonth, -1, Months)); 
    Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days)); 
    Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days)); 
    /*collects calendar events for all days in current month view. Updates _minDate to prevent duplicate data collection if user returns to this month view*/ 
    If(_minDate > _firstDayOfMonth, 
     Collect(MyCalendarEvents, Office365.GetEventsCalendarViewV2(_myCalendar.Name, Text(_firstDayInView, UTC), Text(DateAdd(_minDate, -1, Days), UTC)).value); 
     Set(_minDate, _firstDayInView))

    Here you need to update the collect formula

     

     

     Collect(MyCalendarEvents, Office365.GetEventsCalendarViewV2(_myCalendar.Name, Text(_firstDayInView, UTC), Text(DateAdd(_minDate, -1, Days), UTC)).value); 

     

    you need to set the formula to something like 

     

    Collect(MyCalendarEvents, 
    Filter(SHAREPOINTLISTNAMEHERE, DATECOLUMNNAME HERE >= _firstDayInView && DATECOLUMNNAME <= DateAdd(_minDate, -1, Days)));

    the right navigation has a similar formula. Again replace the collect formula 

     Collect(MyCalendarEvents, Office365.GetEventsCalendarViewV2(_myCalendar.Name, Text(DateAdd(_maxDate, 1, Days), UTC), DateAdd(_firstDayInView, 40, Days)).value); 

    to something like

    Collect(MyCalendarEvents, 
    Filter(SHAREPOINTLISTNAMEHERE, DATECOLUMNNAME HERE >= DateAdd(_maxDate, 1, Days) && DATECOLUMNNAME <= DateAdd(_firstDayInView, 40, Days)));

    the event indicator

    navigate to gallery called MonthDayGallery1

    click on the element Circle1 

    select the visible property

    image.png

    you will see a formula like 

    /*Visible if calendar events are found on this day*/ 
    CountRows(Filter(MyCalendarEvents, DateValue(Text(Start)) = DateAdd(_firstDayInView,ThisItem.Value,Days))) > 0 && !Subcircle1.Visible && Title2.Visible

    this essentially checks each day on the calendar to see if there are any events for the day. If there are events it shows the little red dot indicator. This formula is actually quite inefficient as it is counting how many events are on each day. If you have a lot of events this can really slow down your app. So I would suggest something like this: 

     

    DateAdd(_firstDayInView,ThisItem.Value,Days) in MyCalendarEvents.DATECOLUMNNAME

    it essentially just checks  if the calendar date exists within the collections date column. 

     

    FINALLY the event details

    I am referring to the gallery below the calendar gallery

    image.png

    if you select the gallery named CalendarEventsGallery1 and the property Items

    you will see the following formula 

    SortByColumns(Filter(MyCalendarEvents, Text(Start, DateTimeFormat.ShortDate) = Text(_dateSelected, DateTimeFormat.ShortDate)), "Start")

    you need to modify this to use your date column 

     

    SortByColumns(Filter(MyCalendarEvents, Text(DATECOLUMNNAME, DateTimeFormat.ShortDate) = Text(_dateSelected, DateTimeFormat.ShortDate)), "DATECOLUMNNAME")

    the final final setup is to update the labels within the gallery so they use data from your collection. 

     

    when you have done all that it should work.

     

    Hopefully you will find this useful! 

    Thanks,

    Luke

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard