Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hey, I am new to power bi, and still learning. I want to know how to get maximum salary, name of employee with maximum salary and department in power bi? I want to show the data in tabular form.
Solved! Go to Solution.
Hi Have corrected the measure try this one:
Regards
Hi, when I tried the same only for the name & max salary...it's getting me the max of name, means in sorted order ex name starting with Z***** against the salary
Hi @malay1803
Based on input data here is my approach to finding max salary and name for a given department
you need to create two measure:
1. max salary = MAX(Sheet4[Salary])
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: www.youtube.com/@Howtosolveprobem
Regards
Hey, thanks for replying.
I tried this code, but the name which is being returned is the last name available for that dept.
So if the data goes like this:
Name | Dept | Salary |
A | 1 | 3500 |
B | 1 | 4300 |
C | 1 | 2200 |
D | 2 | 1200 |
E | 2 | 3240 |
F | 3 | 6300 |
G | 3 | 2319 |
H | 3 | 1200 |
then the output should be
Name | Dept | Salary |
B | 1 | 4300 |
E | 2 | 3240 |
F | 3 | 6300 |
But using the measure/query provided by you. It is returning
Name | Dept | Salary |
C | 1 | 4300 |
E | 2 | 3240 |
H | 3 | 8200 |
Hi Have corrected the measure try this one:
Regards
Heyy, This WORKED! Thanks alot! Big Help!
Hi @malay1803
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Please supply some data and an example of the desired result.
Phil
Proud to be a Super User!
Hey Phil, Thanks for replying. As the data is quite huge, below is a dummy data.
Name | Dept | Salary |
A | 1 | 3500 |
B | 1 | 2200 |
C | 1 | 4300 |
D | 2 | 1200 |
E | 2 | 3240 |
F | 3 | 6300 |
G | 3 | 2319 |
H | 3 | 8200 |
I want the below desired output.
Name | Dept | Salary |
C | 1 | 4300 |
E | 2 | 3240 |
H | 3 | 8200 |
Hi,
These measures work
Max salary = MAX(Data[Salary])
Highest earner = CALCULATE(MAX(Data[Name]),FILTER(Data,Data[Salary]=[Max salary]))
Hope this helps.
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
94 | |
90 | |
83 | |
75 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |