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 / Connect pie chart to S...
Power Apps
Unanswered

Connect pie chart to SharePoint list not showing "Choice" columns

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I'm connecting a pie chart to a SharePoint list but is not giving me the ability to choose any "Choice" Columns. Will the pie chart even recognize them? How do I get the pie chart to accept those columns?

 

Thanks in advance.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ShadowTech 

    You will need to convert them to simple columns in your Items property of the chart.

    Ex.

       AddColumns(yourList, "choiceValue", choiceColumn.Value)

    Now the choiceValue column will be available to use in your chart.

     

    I hope this is helpful for you.

  • rebeccas Profile Picture
    2,591 on at

    Typically the best thing to do on pie charts is to put into a collection to get the information grouped where the data shows as you need it to. 

     

    An example would be if I have a sharepoint list with a column called "Status" and I want to the pie chart to show based on the Count of each Status I would have:

     

    Screens - OnVisible: 

    ClearCollect(CollStatusCount, AddColumns(GroupBy(SPListName, "Status","GrpByStaus"),"CountStatus",CountRows(GrpByStatus)))

     

    Then for my Pie Chart the Items is CollStatusCount

     

    You can do by Sum, Count and several other things but you have to get the data formatted correctly for the Charts to work. Basically you are grouping by whatever field you want to show in the chart and then adding a column to show the value for that group and that is what you are looking to.

  • ShadowTech Profile Picture
    on at

    @RandyHayes  What is the "ChoiceValue"?  as I do want to show all values in the pie chart.

     

    Thanks

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ShadowTech 

    ChoiceValue is just the simplified value of the choice field in your datasource.  Since the chart cannot work with a Choice column directly, this will add a simple column representation of the value in the underlying record choice column.

    Can you explain more about what you mean by you don't want to show all values in the pie chart?

  • ShadowTech Profile Picture
    on at

    @rebeccas How would the syntax look with the following? As its not identifying "Invoice Correction" column.

     

    Invoice Correction (column)

     

    Thanks

  • rebeccas Profile Picture
    2,591 on at

    Invoice Correction is the column you want to show in the chart? Do you want it to show as a count or sum?

     

    The collections is getting the values formatted like this:

     

    Invoice Correction | CountItems

    -------------------------------------

    Type One              |       42

    Type Two              |       67

     

    You have to have something it "grouped as" -- which is what would show in the legend and then your value, which is typically count or sum but could be other values (that is the part that decides the size of the pie piece). 

  • ShadowTech Profile Picture
    on at

    @RandyHayes I meant I do. So I'm using the formula as is below and am using "ChoiceValue" as the label but not sure what to use for the series. I just want the pie chart to show how many time each value is used. Maybe I'm not understanding.

     

    Notice "Quantity" shows twice.

     

    0000.jpg

     

    Screenshot 2020-12-17 134902.jpg

  • ShadowTech Profile Picture
    on at

    @rebeccas I want the total number for each value to show  on the chart. So for example if there were 10 records and the value "Price" was entered under the Invoice Correction column 6 times, I want to see the value "Price" with a count of 6.

     

    Basically one value for each but the total count next to it.

     

    Thanks

  • rebeccas Profile Picture
    2,591 on at

    So take this below and put it as the screens OnVisible: 

    ClearCollect(CollInvCorrCount, AddColumns(GroupBy(SPListName, "Invoice Correction","GrpByCount"),"CountCorrection",CountRows(GrpByCorrection)))

     

    You will have to change your SharePoint list name in that but the rest you can leave. Then click to another screen and back to this one to create the Collection.

     

    On your chart the; Pie Chart Items for it will be CollInvCorrCount 

    The Legend Items will be PieChart1.SeriesLabels (this should pull right on own but can be tweaked if not) and then for the label you just put whatever you want (name).

     

    That should give you want you want from what I have gathered. 

  • ShadowTech Profile Picture
    on at

    @rebeccas This is what I get:

     

    Plus getting errors.

     

     

    ClearCollect(CollInvCorrCount, AddColumns(GroupBy('Credit Memo', "Invoice Correction","GrpByCount"),"CountCorrection",CountRows(GrpByCorrection)))

     

     

    Not seeing additional choices in the "Series".

     

    112121.jpg

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard