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 / Pie Chart to show numb...
Power Apps
Answered

Pie Chart to show number of same item

(0) ShareShare
ReportReport
Posted on by 175

 

I have Sharepoint called JML 3.0 and one column is called "Location".

This column has for location called, "Menara Shell", Lutong, "PS" and "LSB".

This column will have multiple number of the same location based on the input by user.

 

vikna_0-1682990311970.png

 

I need to do a pie chart in Powerapps, whereby the Legends will be these 4 locations and the item in pie chart should show number of times "Menara Shell" or the other locations is in the Sharepoint.

 

If Menara Shell has 8 rows, then it should show the number 8 in the chart.

 

Please advise as I'm not sure how to do this.

Thank you in advance!

 

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

    Hi @vikna ,

     

    Please try:

    AddColumns(GroupBy('JML 3.0',"Location","NewGroup"),"CountLocation",CountRows(NewGroup))

     

    Best Regards,
    Bof

  • vikna Profile Picture
    175 on at

    thanks for the advise @v-bofeng-msft ..

     

    I've managed to get it to work as per your advice.
    However, in the pie chart, can I make it to show the number instead of the location name?

     

    vikna_0-1683005328467.png

     

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

    Hi @vikna ,

     

    You could set the pie chart's label property to 'CountLocation'

    vbofengmsft_1-1683005906482.png

    Best Regards,

    Bof

     

     

  • vikna Profile Picture
    175 on at

    I've tried doing this for the first solution and it works too...however, the legends also turns to the numbers.

    vikna_0-1683006992219.png

     

    If there is no other way, then I think I can just add new text item on top of it to hide the legends.

     

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

    Hi @vikna ,

     

    Please try:

    ShowColumns(AddColumns(GroupBy('JML 3.0',"Location","NewGroup"),"CountLocation",CountRows(NewGroup),"NewTilte",Location&" "&CountRows(NewGroup)),"NewTilte","CountLocation")

     

    Best Regards,

    Bof

  • hayleymaree Profile Picture
    2 on at

    Hello - how would this change if Location was a choice field?

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard