cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hooi
Helper I
Helper I

Need help to create pie chart in PowerApps with SharePoint List data

Hi, this is my first time to create a pie chart in Power Apps with SharePoint List data. 

 

Currently, I have a SharePoint List named "Learning Tracker" and have a number of column as per below 

 

Hooi_0-1629364519887.png

 

and when employees completed the courses in Digital Transformation/ One Drive/ Teams, SharePoint List will mark "Completed" and All course will mark "Yes". As per example in excel format below: 

 

Hooi_1-1629364915176.png

 

I want to have 5 pie charts show that

1. How many "Completed" in Digital Transformation,

2. How many "Completed" in One Drive and

3. How many "Completed" in TEAMS and also

4. how many "Yes" in All course column

5. How many "Yes" in All course and categorise by Region

 

How can I do so? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @Hooi lets go through this and do one for you

 

This is what we want from the data

rubin_boer_0-1629373646851.png

 

(Note i only include the totals for teams, you will have to add the rest). You may also want to create a collection to hold all values whereas i will do the with function in the Items of the Pie chart to illustrate the solution ok.

 

the PI chart Items = 

 

With(
    {
        tot: CountRows(colCourses),
        teamsTot: CountRows(
            Filter(
                colCourses,
                teams = "Completed"
            )
        )
    },
    Table(
        {
            Name: "Incomplete(" & tot - teamsTot & ")",
            Total: tot - teamsTot
        },
        {
            Name: "Complete(" & teamsTot & ")",
            Total: teamsTot
        }
    )
)

 

 

Hope this helps

 

 

View solution in original post

2 REPLIES 2
rubin_boer
Super User
Super User

hi @Hooi lets go through this and do one for you

 

This is what we want from the data

rubin_boer_0-1629373646851.png

 

(Note i only include the totals for teams, you will have to add the rest). You may also want to create a collection to hold all values whereas i will do the with function in the Items of the Pie chart to illustrate the solution ok.

 

the PI chart Items = 

 

With(
    {
        tot: CountRows(colCourses),
        teamsTot: CountRows(
            Filter(
                colCourses,
                teams = "Completed"
            )
        )
    },
    Table(
        {
            Name: "Incomplete(" & tot - teamsTot & ")",
            Total: tot - teamsTot
        },
        {
            Name: "Complete(" & teamsTot & ")",
            Total: teamsTot
        }
    )
)

 

 

Hope this helps

 

 

Hi @rubin_boer , thanks for replying. This really helps me a lot. 

 

I have used the formula you shared and would like to create a chart as per below but i failed to do so. To explain how many students under which teachers have/have not completed the task.

2nd picture is my data set. 

 

May I know if other there is any formula that can calculated the number of teacher and also calculated the number of course completion? 

 

Hooi_1-1629431991237.png

 

Hooi_0-1629431942066.png

 

 

Thanks for your helps in advance

 

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,075)