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 / Issue with Pie Graph i...
Power Apps
Unanswered

Issue with Pie Graph in PowerApps

(0) ShareShare
ReportReport
Posted on by

I have a SharePoint list containing NPS categories: Promoters, Passives, and Detractors. I created a pie chart in Power Apps to visually display this data. Additionally, I added a drop-down choice box related to the "Department" column in SharePoint.

When a user selects a department, the chart displays data only for the chosen department. Everything functions correctly. However, when I filter, for example, this sample department, it counts detractors instead of promoters, even though in the SharePoint list it's supposed to be Promoters.

 

The screen shot below, shows an accurate representation of the data:

SS1.png

 

But this screen shot below is wrong: In my sharepoint list, its promoter, but in the pie chart it puts it in as detractor.

ss2.png

 

Here's the code i have in the items properties of the pie chart.

 

AddColumns(
    GroupBy(
        Filter('CEA Observation', Department = Dropdown1_3.Selected.Value),
        "NPSCategory",
        "GroupData"
    ),
    "Percentage",
    Text(
        Round(
            CountRows(GroupData) / CountRows(Filter('CEA Observation', Department = Dropdown1_3.Selected.Value)) * 100,
            2
        ),
        "[$-en-GB]0.0%"
    )
)
Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Jerico0208,

     

    Is it possible that you changed the NPS Category within SharePoint while the app was still open? Would it be possible to refresh your SharePoint datasource within the app and rerun the code? 

     

    LaurensM_0-1710183865705.png

     

    Alternatively, you could remove & readd the datasource connection.

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

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

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard