cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
alemonz Frequent Visitor
Frequent Visitor

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

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter for max value based upon another column

Hi @alemonz ,

 

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 other members find it more quickly.

View solution in original post

3 REPLIES 3
edhans Super Contributor
Super Contributor

Re: Filter for max value based upon another column

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.

Community Support Team
Community Support Team

Re: Filter for max value based upon another column

Hi @alemonz ,

 

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 other members find it more quickly.

View solution in original post

alemonz Frequent Visitor
Frequent Visitor

Re: Filter for max value based upon another column

thank you very much

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 312 members 2,785 guests
Please welcome our newest community members: