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
Anonymous
Not applicable

Filter for max value based upon another column

Hi,

 

I would like to filter for the max value in one column based upon another column which is a project name over a range of time.

 

Basically I want to find the max total employees for each project which has multiple entries and create a new table with just the max value for each project

 

 PowerBi help.JPG

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

One sample for your reference. Here we can create a calculated column as below to work on it.

 

max total = CALCULATE(MAX(Table1[Total Employees]),FILTER(Table1,Table1[Project name]=EARLIER(Table1[Project name])))

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

One sample for your reference. Here we can create a calculated column as below to work on it.

 

max total = CALCULATE(MAX(Table1[Total Employees]),FILTER(Table1,Table1[Project name]=EARLIER(Table1[Project name])))

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

thank you very much

edhans
Super User
Super User

In Power Query

 

  1. select the Project Name column
  2. Select Group By on the home tab
  3. Name the column - "Max of Employee Count" for example.
  4. Select MAX for the operation
  5. Select the Total Employees column.

The load that into the data model.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.