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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
sivarajan21
Post Prodigy
Post Prodigy

How to create dax to find max salary in same column

Hi,

 

I have these below two sample datasets:

PFA sample file in below link:

To find max salary.pbix

 

Worker table:

worker_idfirst_namelast_namesalaryjoining_datedepartment
1MonikaArora10000020/02/2014 00:00HR
2NiharikaVerma8000011/06/2014 00:00Admin
3VishalSinghal30000020/02/2014 00:00HR
4AmitahSingh50000020/02/2014 00:00Admin
5VivekBhati50000011/06/2014 00:00Admin
6VipulDiwan20000011/06/2014 00:00Account
7SatishKumar7500020/01/2014 00:00Account
8GeetikaChauhan9000011/04/2014 00:00Admin
9AgepiArgon9000010/04/2015 00:00Admin
10MoeAcharya6500011/04/2015 00:00HR
11NayahLaghari7500020/03/2014 00:00Account
12JaiPatel8500021/03/2014 00:00HR

 

title table:

worker_ref_idworker_titleaffected_from
1Manager20/02/2016 00:00
2Executive11/06/2016 00:00
8Executive11/06/2016 00:00
5Manager11/06/2016 00:00
4Asst. Manager11/06/2016 00:00
7Executive11/06/2016 00:00
6Lead11/06/2016 00:00
3Lead11/06/2016 00:00

 

We need to find the job titles of the highest-paid employees using dax.

Your output should include the highest-paid title or multiple titles with the same salary.

The expected output would be:

worker_titlesalary
Asst. Manager500000
Manager500000
 
Could you please help me in creating a dax?
 
Thanks in advance
2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

@sivarajan21 Maybe something like the attached PBIX. You can use either an explicit or implicit MAX coupled with a Top N filter.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.  Mine is a measure based solution without using the Top n filter from the Filter pane.

Hope this helps.

Untitled.png


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

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.  Mine is a measure based solution without using the Top n filter from the Filter pane.

Hope this helps.

Untitled.png


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

Hi Ash,

 

Thanks for your solution😊

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Community Champion
Community Champion

@sivarajan21 Maybe something like the attached PBIX. You can use either an explicit or implicit MAX coupled with a Top N filter.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler ,

 

Apologise for delay in response!

Thats an amazing solution and you made it look so easy😊

This is what I was looking exactly and I have noted this TOPN function for future reference.

I will accept this as solution and close this query.

 

Thanks a lot to you and beautiful community.

 

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!

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.

Top Solution Authors