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

Pie Chart

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi guys, I am currently building an analytical feature within my app where I have a pie chart displaying the percentages of each item within the column as seen below.

Kane2_0-1670206342164.png

However, I want to filter the pie chart above by only showing a specific item percentage and labelling the rest as "others", is there a way to do so or how can I edit my code below? Thanks in advance!

Kane2_1-1670206409701.png

@WarrenBelz @RandyHayes @Drrickryp 

Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Please try:

    AddColumns(
    AddColumns(
    GroupBy(
    xxxx
    ),
    ),
    "_percentage",
    If(HiddenCategory="specific item",Text((_number/_total)*100,"0%"),"others")
    )

     

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi I did as you said, it worked at seen below. However, is there a way to merge all of the "others" section of the pie chart into 1 section? Thanks Again 🙂

    Kane2_0-1670207423783.png

     

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

    Hi @Anonymous ,

     

    Please try:

     

    AddColumns(
    AddColumns(
    GroupBy(
    AddColumns(HiddenMasterGallery.AllItems,"NewLabel",If(HiddenCategory="specific item","specific item","Others")),
    "NewLabel",
    "_cat"
    ),
    "_total",CountRows(HiddenMasterGallery.AllItems),
    "_number",CountRows(_cat)
    ),
    "_percentage",
    If(NewLabel="specific item",Text((_number/_total)*100,"0%"),"others")
    )

     

    Best Regards,
    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello again, the image below shows my current chart. Is it possible to change both the labels to percentages while having the legend as "Specific Item" & "Others"?

    Kane2_0-1670209127450.png

     

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Please try:

     

    AddColumns(
    AddColumns(
    GroupBy(
    AddColumns(HiddenMasterGallery.AllItems,"NewLabel",If(HiddenCategory="specific item","specific item","Others")),
    "NewLabel",
    "_cat"
    ),
    "_total",CountRows(HiddenMasterGallery.AllItems),
    "_number",CountRows(_cat)
    ),
    "_percentage",
    Text((_number/_total)*100,"0%")

    )

     

     

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much! it works perfectly now:)))

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard