Hi,
I have a powerapp where users are asked to select the team they're in (choice column in SP list) and then input a number of miles they have walked.
What I want to do is display the sum of those miles per team in a leaderboard type gallery or chart.
I know for pie charts they don't allow for a 'choice' column to be one of the fields the data is pulled from but I'm struggling to work out how to do it in a blank vertical gallery too.
I have managed to find the sum of miles for an individual:
My question is how can I filter it by team rather than individual?
If someone could help me with how to put it in a pie chart that would be ideal!
Thanks
@BT168
You can do this by adding .Value to the end of the Choices column name.
Sum(Filter(MilesChallenge,Team.Value=ThisItem.Team.Value),Miles) & " Miles"
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Thanks @mdevaney however nothing is coming up.
Within my blank gallery i have two labels, and the first label is not pulling through the choices. Is there something I'm missing?
1st label:
Sum(Filter(MilesChallenge,Team.Value=ThisItem.Team.Value),Miles) & " Miles"
@BT168
Do you actually have a Choices column named Team? Make sure to use your own column name: not the one I provided. It was just an example.
@BT168
Type this code in the label and see what auto-complete suggests. Make sure to include the period.
ThisItem.Team.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
So that worked when I put in ThisItem.Team.Value (just needed a refresh) but instead of showing all the teams in the choices list on the gallery, it just shows a lengthy blank gallery even when I have tested putting in entries selecting different teams:
Don't know if the screenshot shows clearly what I mean.
@BT168
Try changing the TemplateHeight property of the Gallery to something smaller like 70.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
199 | |
71 | |
49 | |
41 | |
30 |
User | Count |
---|---|
266 | |
121 | |
95 | |
90 | |
81 |