Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
kman42
Frequent Visitor

Compare an individual filtered by slicer to average of the category

I have a table of people of various titles and I'd like to compare an individual's performance over time to the average of everyone else with their same title. I'm using a slicer to select the person of interest and am using a line chart to show their performance over time, which works as expected, but I can't figure out the measure to get the average of everyone else in their title (preferably without the person of interest, but I'll take the overall average if I have to). For example

 

Person table:

Person IDNameTitle
1BobAssistant
2SallyAssistant
3MikeAssistant
4JenAssociate
5PhilSenior

 

Performance table:

Person IDDateValue
11/1/20242
12/1/20244
13/1/20246
21/1/20241
22/1/20241
23/1/20241
31/1/20246
32/1/20245
33/1/20247

 

If I select Bob with my slicer, then I would like to graph Bob and the average of the other Assistants vs time, but I can't figure out the correct measure for getting the average of the other people of the same title. Any help would be appreciated.

 

Thanks!

2 ACCEPTED SOLUTIONS
hansontm
Resolver I
Resolver I

Hi there, I created the following measure:

Avg Value =
VAR selectedtitle = SELECTEDVALUE(Person[Title])

RETURN CALCULATE(AVERAGE(Performance[Value]),  Person[Title] = selectedtitle, ALL(Performance))
 
hansontm_0-1731102543919.png

 

This does not filter out the selected person, but provides what you asked for. 

 

If correct, please mark as solved.

View solution in original post

Anonymous
Not applicable

Hi @kman42 ,

Based on the description, the method hansontm provided should be helpful.

Besides, you can try the following DAX formula. Creating two measures to calculate the individual average and others average.

Average Performance = AVERAGE('Performance table'[Value])
Average Performance Others = 
VAR SelectedPerson = SELECTEDVALUE('Performance table'[Person ID])
VAR SelectedTitle = CALCULATE(MAX('Person table'[Title]), 'Performance table'[Person ID] = SelectedPerson)
RETURN
CALCULATE(
    AVERAGE('Performance table'[Value]),
    FILTER(
        ALL('Person table'),
        'Person table'[Title] = SelectedTitle && 'Person table'[Person ID] <> SelectedPerson
    )
)

Then, drag the Date column to the X-axis and drag the two measures to the Y-axis.

vjiewumsft_0-1731390735575.png

Selecting the Bob and the line chart is shown below.

vjiewumsft_1-1731390798691.png

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @kman42 ,

Based on the description, the method hansontm provided should be helpful.

Besides, you can try the following DAX formula. Creating two measures to calculate the individual average and others average.

Average Performance = AVERAGE('Performance table'[Value])
Average Performance Others = 
VAR SelectedPerson = SELECTEDVALUE('Performance table'[Person ID])
VAR SelectedTitle = CALCULATE(MAX('Person table'[Title]), 'Performance table'[Person ID] = SelectedPerson)
RETURN
CALCULATE(
    AVERAGE('Performance table'[Value]),
    FILTER(
        ALL('Person table'),
        'Person table'[Title] = SelectedTitle && 'Person table'[Person ID] <> SelectedPerson
    )
)

Then, drag the Date column to the X-axis and drag the two measures to the Y-axis.

vjiewumsft_0-1731390735575.png

Selecting the Bob and the line chart is shown below.

vjiewumsft_1-1731390798691.png

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar question in the attached file.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
hansontm
Resolver I
Resolver I

Hi there, I created the following measure:

Avg Value =
VAR selectedtitle = SELECTEDVALUE(Person[Title])

RETURN CALCULATE(AVERAGE(Performance[Value]),  Person[Title] = selectedtitle, ALL(Performance))
 
hansontm_0-1731102543919.png

 

This does not filter out the selected person, but provides what you asked for. 

 

If correct, please mark as solved.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.