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
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
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