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 / Create Chart that filt...
Power Apps
Answered

Create Chart that filters data from a list by week

(0) ShareShare
ReportReport
Posted on by 28

nicktempleton2_0-1683585433289.png

Trying to create a chart that filters all of my task hours by week.

 

The tasks are a single choice on sharepoint lists, they have an amount of hours associated with it and a date

 

ClearCollect(
 colDate,
 AddColumns(
 GroupBy(
 Filter(
 'PSE Project Task Tracker',
 'Date of Project task time' >= _FirstDayofWeek && 'Date of Project task time' <= _FirstDayofWeek +7 && (User().Email = 'Created By'.Email)
 ),
 "Project Task1",
 "GPTask"
 ),
 "CountbyTask",
 CountRows(GPTask)
 )
);

 

 

How would i go about doing this?

Categories:
  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @nicktempleton2 ,

    I assume the issue is the Choice column (or is there something else not working ?

    ClearCollect(
     colDate,
     AddColumns(
     GroupBy(
     AddColumns(
     Filter(
     'PSE Project Task Tracker',
     'Date of Project task time' >= _FirstDayofWeek && 
     'Date of Project task time' <= _FirstDayofWeek + 7 && 
     'Created By'.Email = User().Email
     ),
     "ProjectTask",
     'Project Task1'.Value
     ),
     "ProjectTask",
     "GPTask"
     ),
     "CountbyTask",
     CountRows(GPTask)
     )
    );

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • nicktempleton2 Profile Picture
    28 on at
    ClearCollect(
     colTest,
     AddColumns(
     GroupBy(
     AddColumns(
     'PSE Project Task Tracker',
     "Project Task1",
     'Project Task'.Value
     ),
     "Project Task1",
     "GPTask"
     ),
     "CountbyTask",
     CountRows(GPTask) 
     )
    );

    As of right now this works but when i try to filter it down to the 1 week range it stops working

  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @nicktempleton2 ,

    I answered another post on this issue yesterday - try

    With(
     {wNext: FirstDayofWeek + 7},
     ClearCollect(
     colDate,
     AddColumns(
     GroupBy(
     AddColumns(
     Filter(
     'PSE Project Task Tracker',
     'Date of Project task time' >= _FirstDayofWeek && 
     'Date of Project task time' <= wNext && 
     'Created By'.Email = User().Email
     ),
     "ProjectTask",
     'Project Task1'.Value
     ),
     "ProjectTask",
     "GPTask"
     ),
     "CountbyTask",
     CountRows(GPTask)
     )
     )
    );

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • nicktempleton2 Profile Picture
    28 on at

    That worked thank you! But how would I get the columns to show the hours spent on each task versus right now it just counts how many tasks?

  • Verified answer
    WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @nicktempleton2 ,

    Add another column

    With(
     {wNext: FirstDayofWeek + 7},
     ClearCollect(
     colDate,
     AddColumns(
     GroupBy(
     AddColumns(
     Filter(
     'PSE Project Task Tracker',
     'Date of Project task time' >= _FirstDayofWeek && 
     'Date of Project task time' <= wNext && 
     'Created By'.Email = User().Email
     ),
     "ProjectTask",
     'Project Task1'.Value
     ),
     "ProjectTask",
     "GPTask"
     ),
     "CountbyTask",
     CountRows(GPTask),
     "TotalTasks"
     Sum(GPTask,YourNumberField)
     )
     )
    );

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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