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

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.

Reply
Rakim
New Member

DAX Help Needed - Count of employees above median salary

I want to create a DAX measure to calculate count of employee positions whose salaries fall below the median (< median).

The median salary is in a separate table from the employee data. I am new to DAX and am having trouble creating workable DAX for this.

Any ideas or a sample DAX to solve this conundrum?

I appreciate any help.

1 ACCEPTED SOLUTION

Every DAX formula depends on the table structure and the relationships. It is very difficult to give you advice without understanding exactly what the tables of data look like.  It also depends on how large your data is as to what the best approach will be. If it is a relatively small data set, say less than 10 or 20,000 employees, I would suggest just take a simple approach using a many to many relationship. This can be dangerous, but it is fine as long as you do it right. 

i suggest you post some sample data

 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

2 REPLIES 2

Every DAX formula depends on the table structure and the relationships. It is very difficult to give you advice without understanding exactly what the tables of data look like.  It also depends on how large your data is as to what the best approach will be. If it is a relatively small data set, say less than 10 or 20,000 employees, I would suggest just take a simple approach using a many to many relationship. This can be dangerous, but it is fine as long as you do it right. 

i suggest you post some sample data

 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Thanks for your help, Matt! This is actually for someone else. I won't be given access to the Power BI file (including the relationships and table structure) unfortunately.

 

I appreciate your assistance nevertheless. Enjoy the holidays.  

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors