Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 @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: https://www.youtube.com/@letssolveproblem
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
95 | |
83 | |
70 | |
66 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |