Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kamaker
Partner - Contributor II
Partner - Contributor II

Filter down to the individual and show the average for its associated team

I am creating an app where an individuals results are compare to their team's results. I have a dataset of mileage statistics for individuals along with their team name. In my app I have a filter pane for the individual. I want to show the individual's average miles and their team's overall average mileage. I know I need to use set analysis but I can not figure out how to do the team average instead of everyone's average mileage. 

formulas: 

Individual: Avg(miles)

Team: Avg({1 <[team name]>}miles)

The issue is that the team is everyone's average mileage and not just that team's average mileage.

Labels (1)
1 Solution

Accepted Solutions
vincent_ardiet_
Specialist
Specialist

For the individual Avg(miles) is working right?

For the team (according that the field you are filter on is called [Individual Name], this should do the trick:
Avg({<[Individual name]=,[team name]=p([team name])>}miles)

View solution in original post

4 Replies
Aasir
Creator III
Creator III

For Individual's Average Miles:  Avg({<Individual = {"$(=GetCurrentField(Individual))"}>} miles)

For Team's Average Miles: Avg({<Team = {"$(=GetCurrentField(Team))"}>} miles)

kamaker
Partner - Contributor II
Partner - Contributor II
Author

Unfortunately it did not work. The KPI stayed as a '-' for both formulas. 

kamaker
Partner - Contributor II
Partner - Contributor II
Author

I tried to use GetFieldSelection but it filters down to the person's average and not just the team's average.

vincent_ardiet_
Specialist
Specialist

For the individual Avg(miles) is working right?

For the team (according that the field you are filter on is called [Individual Name], this should do the trick:
Avg({<[Individual name]=,[team name]=p([team name])>}miles)