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
Answered

Bar Chart

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

 

I have a working app and I want to produce management information from it. I have a list of tasks for different departments and this app allows users to check them off on completion. It is a pretty straight forward app

 

I would like to produce a bar chart that shows the daily performance of completing these tasks against the total number of tasks. So the y axis has the number of tasks, the x axis shows each department, one series is the total number of tasks and the second series shows the task completed. Easy to do in Excel but I don’t have a clue how to do this in PowerApps

 

The data is stored on SharePoint lists. There are separate lists that store the list of tasks, the log of completed tasks and the departments. They all have unique referencing

 

I have a feeling I should be building a collection first and linking the table to. I have also played around with AddColumns & CountRows, to no avail. It is also possible that I shouldn’t even attempt to do this PowerApps. I have access to Power BI but that does not update in Realtime, except with much reduced functionality.

 

Please help!

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Anonymous. Have you tried the PowerApps "Chart" control yet

    @Audrie-MSFT did a great YouTube video on Chart functionality using Slider Controls (See ~8:45 mark). That was enough to get me started.

    Good luck!

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Based on the needs that you provided, I think the Column Chart control (or Pie Chart control, Line Chart control) could achieve your needs.

    I agree with your thought, firstly, you should join/combine your multiple SP list data sources with a unique join key. More details about combining/joining multiple data sources with a unique join key, please check the following thread:

    https://powerusers.microsoft.com/t5/General-Discussion/Can-I-add-fields-from-multiple-data-sources-into-a-single/td-p/7376

    https://powerusers.microsoft.com/t5/General-Discussion/Fill-data-table-from-two-sharepoints/m-p/184180

    After that, you could Apply some AddColumns function and CountRows function to the above combined result to achieve your needs.

    Please check and see if my response within the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/Administering-PowerApps/Show-labels-in-bar-chart-as-percentages/m-p/183440

    https://powerusers.microsoft.com/t5/General-Discussion/Column-Chart-Formula-Help/m-p/180933

     

    Best regards,

    Kris

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi folks

     

    Incredibly I managed to work this out. I was at my wits end when I posted this question. They key piece of knowledge is that Powerapps will only produce a graph based on a table of data or a collection. Where you need data from two or more tables you need to produce the equivalent of an Access query in a collection. Once you have done this the rest is quite straightforward.

     

    In order to build my collection I used one table of data (tasklist) and used the add column function to count the number of instances from the second table (tasksubmission). So my formula looked like this

     

    ClearCollect(CollectionName,AddColumns(TaskList,"TestCount",CountIf(tasksubmission ,Local_Task_ID=Task_ID,DatePicker1.SelectedDate=DateValue(Text(UpdateDate)))))

     

    After this you insert a chart, and define in Items how you want the data to be displayed. As far as I can see the usual way to do this is with the following formula

     

    AddColumns(GroupBy(“CollectionName”,”Field1”,”AllItems”), “Series1Name”, CountRows(AllItems),…

     

    In the groupby formula you define the x axis. In my case for Field1 I used the different departments in my organisation. Where it say Series1Name you define the name of the first series and after the following comma you put in a basic function explaining what you want to display the values. I have used countrows and sum so far. You can add further series’ afterwards or stop at one with a close bracket. Remember to update the NumberofSeries property as well.

     

    I am not sure what the options are with AllItems, I am sure there is a way of having SomeItems.

     

    And that’s it. Please let me know there is a better way of achieving this. I am looking forward to seeing how Shane Young would approach this, if he ever gets to posting a video about graphs.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-xida-msft. I'm having some trouble with Bar Chart not being to scale. Do you have any insights on this?

    Thank you

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard