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 / Filter Column chart Po...
Power Apps
Unanswered

Filter Column chart Power Apps

(0) ShareShare
ReportReport
Posted on by 522

I have column chart where it is connected to datasource which I need filter based on weekly based Tasks which are <1 week, 1-2 weeks, 2-4 weeks and >4 weeks

 

 So far I tried with this, which needs to have 4 columns which should calculate from today's to <1 week, today's to 1-2 weeks

Filter('Task List_1',Created <= (Today()-7) && Created > DateAdd(Today(),-14))

  And It needs to show only under Task status of On Track, Not yet started, Pending but it should not show the completed ones.

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    To filter a column chart in Power Apps based on the weekly duration of tasks and specific task statuses, you can use the following steps:

    1. Ensure that you have a column chart control in your Power Apps app, and it is connected to the appropriate data source (in this case, 'Task List_1').

    2. Set the Items property of the column chart control to the following formula:

    Filter(
     'Task List_1',
     Created <= Today() &&
     Status in ["On Track", "Not yet started", "Pending"] &&
     Status <> "Completed"
    )
    1. This formula filters the tasks based on the following criteria:

      • Created date is on or before today.
      • The task status is either "On Track", "Not yet started", or "Pending".
      • The task status is not "Completed".
    2. Configure the column chart control's properties, such as the X-Axis, Y-Axis, and Legend, according to your data and visualization preferences.

      • Set the X-Axis property to the desired column from the 'Task List_1' data source, such as "Task Name" or "Task Type".
      • Set the Y-Axis property to a relevant column that represents the count or duration of the tasks.
      • Set the Legend property to a column that provides additional categorization or differentiation, if applicable.
    3. Customize the legend labels and axis labels as needed to provide clear information to the users.

    By following these steps, you can filter the column chart to display tasks based on their weekly duration and specific task statuses, while excluding completed tasks. Adjust the column chart's properties and the filter formula to match your specific data source and requirements.

  • Nikhil2 Profile Picture
    522 on at

    @ShaheerAhmad I tried the above suggestion but it looks like it is not grouping to weekly basis, example pending one task created on 2 weeks before but it is counting from today everything. Below is the result but I want to show <1 week one column 1-2 weeks one column how many are less than week and how are more than 1-2 weeks so on from today's to Created date (SP column)

     

    Nikhil2_0-1686648375803.png

     

  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    To group the tasks in the column chart based on weekly durations, you can modify the formula as follows:

     

    ClearCollect(
     FilteredTasks,
     Filter(
     'Task List_1',
     Status in ["On Track", "Not yet started", "Pending"] &&
     Status <> "Completed"
     )
    );
    
    ClearCollect(
     WeeklyTasks,
     AddColumns(
     GroupBy(
     FilteredTasks,
     "Week",
     "WeekNumber",
     RoundDown((Today() - Created) / 7, 0)
     ),
     "Count",
     CountRows(WeekNumber)
     )
    )

     

    In this updated formula, we first use the Filter function to retrieve the tasks with the desired statuses and exclude the completed ones. We then use the GroupBy function to group the filtered tasks based on their weekly durations.

    The RoundDown function is used to calculate the week number by dividing the difference between today's date and the created date by 7. This gives us the number of weeks between the two dates, rounded down to the nearest whole number. This will effectively group the tasks into the desired weekly buckets.

    Finally, we use the AddColumns function to add a new column named "Count" to the grouped tasks collection, which represents the count of tasks in each weekly duration.

    You can now set the Items property of your column chart to the WeeklyTasks collection and configure the X-Axis, Y-Axis, and Legend properties accordingly.

    Make sure to adjust the data source and column names in the formula to match your specific scenario.

  • Nikhil2 Profile Picture
    522 on at

    @ShaheerAhmad On Visible property.

    The second clear collect shows error for the RoundDown expected literal text. as below error

     

    Nikhil2_0-1686649334899.png

     

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard