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 / 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
    Microsoft Employee 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

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

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 294 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 169

Last 30 days Overall leaderboard