web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Populating a Pie Chart...
Power Apps
Answered

Populating a Pie Chart using value ranges

(0) ShareShare
ReportReport
Posted on by 53

Hello all - I have a local Collection (colROSurveyData) that has a column Mileage.  I am trying to create a Pie Chart that displays the mileages in ranges (0-15,000 | 15,001 to 30,000 | 30,001 to 45,000 | 45,001 to 60,000 | 60,001 to 75,000 | 75,001 to 90,000 | 90,001 and up).

 

How do I shape the data to create a counted table for ranges of numbers in the Items property of my Series and the Labels be the ranges listed above?

 

scottypotty4x4_0-1716219443965.png

Any help would be appreciated!

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @scottypotty4x4 ,

     

    I've made a test for your reference:

    I assume there is a table

    ClearCollect(YourTable,{Mileage:24157},{Mileage:61474},{Mileage:78451},{Mileage:10147},{Mileage:97414});
    

    You could set the pie chart's items property to:

    ShowColumns(AddColumns(GroupBy(
    AddColumns(
     YourTable,
     LabelColumn,
     If(
     Mileage<=15000,"0-15,000",
     Mileage<=30000,"15,001 to 30,000",
     Mileage<=45000,"30,001 to 45,000",
     Mileage<=60000,"45,001 to 60,000",
     Mileage<=75000,"60,001 to 75,000",
     Mileage<=90000,"75,001 to 90,000",
     "90,001 and up"
     )
    ),LabelColumn,NewGroup),Count,CountRows(YourTable)),LabelColumn,Count)

    vbofengmsft_0-1716254476487.png

     

    Best Regards,

    Bof

     

  • scottypotty4x4 Profile Picture
    53 on at

    PERFECT!  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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard