cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anonymia25
Helper IV
Helper IV

Filter pie chart items based on current user data

I am trying to make a list of items in a pie chart based on the status of requested items by the current user. Below is the code used for showing all status made in the list by everyone, but I wanted the items to only show status made by the current user.

AddColumns(GroupBy(AddColumns('Training Request', "NewField", Status.Value), "NewField", "Status"),"CountbyStatus", CountRows(Status))​


Help is appreciated! Thanks.

 

 

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @anonymia25 :

Could you tell me:

  • Do you want to display data in a pie chart based on the state selected by the user?

If so,please try this solution:

1\Add a dropdown control(dropdown1) and set it's items property to:

["Statu1","Statu2","Statu3","Statu4","Statu5"]

2\Modify the code as:

Filter(
AddColumns(GroupBy(AddColumns('Training Request', "NewField", Status.Value), "NewField", "Status"),"CountbyStatus", CountRows(Status)),
​NewField=dropdown1.Selected.Value
)

Best Regards,

Bof

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,332)