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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
VikasMattela
Frequent Visitor

Retrieve a value in one column based on MAX in another column

Hi,

 

I have multiple 3 columns in one table (Employee,Salary,Year). For each employee in same year there are multiple values. I need a measure a find an employee name in a selected year whose average salary is max.

 

Example: 

Sno          Emp          Values      Year                           

1A312021
2B202022
3C372023
4D422024
5A302021
6B342022
7C252023
8B122021
9C462022
10D352023
11A202024
12C402021
13D432022
14A452023
15C212024
16B492021
17C72022
18D282023
19B82021
20C122022
21D322023
22A272021
23C242022
24D142023
25A102024
26C372021
27D172022
28A72023
29B142021
30C152022
31B462023
32C322024
33D472021
34A282022
35C92023
36D102024
37A292021
38C342022
39D142023
40A232021

 

Solution I am thinking to create summarize Table like below

VikasMattela_0-1698425791909.png

In measure if selected year is 20221,so I would like to get for 2021 C employee has Max Average Value.

1 REPLY 1
vanessafvg
Super User
Super User

I am a little unclear what you are saying, when you say the average salary is max, are you wanting the max value for the year?   Where does the average come in.  Also when i look at the data you have provided it doesn't seem to match your bottom chart, please share your calculation.

 

To me it makers sense that you would use an iterator potentially with summary





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.