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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
matthewtjy
Helper I
Helper I

Getting MAX value IF 2 conditions are met

Hi, how do I go about to create a column "Max_Value_Of_Latest_Submit_Dt" where it would calculate the MAX Sales corresponding to the Latest_Submit_Dt for the particular Employee?

 

In excel I would use the formula {=MAX(IF(A2&D2=A:A&D:D,C:C))} to get the value in E2.

 

Thanks!

 

 ABCDE
1EmployeeSubmit_DtSalesLatest_Submit_DtMax_Sales_Of_Latest_Submit_Dt

2

A

1 Jan103 Jan4
3A3 Jan33 Jan4
4A3 Jan43 Jan4
5B2 Jan24 Jan5
6B3 Jan14 Jan5
7B4 Jan54 Jan5
8C5 Jan86 Jan4
9C5 Jan66 Jan4
10C6 Jan46 Jan4

 

1 ACCEPTED SOLUTION

Sorry,

the above was for the calculated measure.

I posted one more reply that is for the calculated column.

 

Picture3.png

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

5 REPLIES 5
Jihwan_Kim
Super User
Super User

Hi, @matthewtjy 

Sorry for the confuse.

For creating column,

please try below.

 

Max Sales of Last Submit Date Column =
VAR lastsubmitdate =
CALCULATE( MAX ( 'Table'[Latest_Submit_Dt] ), ALLEXCEPT ( 'Table', 'Table'[Employee] ))
RETURN
CALCULATE (
MAX ( 'Table'[Sales] ),
ALLEXCEPT ( 'Table', 'Table'[Employee] ),
'Table'[Submit_Dt] = lastsubmitdate
)
 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Jihwan_Kim
Super User
Super User

Hi, @matthewtjy 

Pleaes try the below DAX measure.

 

Max Sales of Last Submit Date =
VAR lastsubmitdate =
MAX ( 'Table'[Latest_Submit_Dt] )
RETURN
CALCULATE (
MAX ( 'Table'[Sales] ),
ALLEXCEPT ( 'Table', 'Table'[Employee] ),
'Table'[Submit_Dt] = lastsubmitdate
)

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi i've tried to key in the DAX formula but no values appeared and there was no formula error also.

Did I do something wrong?

I used the formula
Max Sales of Last Submit Date =
VAR lastsubmitdate =
MAX ( 'Table'[Latest_Submit_Dt] )
RETURN
CALCULATE (
MAX ( 'Table'[Sales] ),
ALLEXCEPT ( 'Table', 'Table'[Employee] ),
'Table'[Submit_Dt] = lastsubmitdate
)

Sorry,

the above was for the calculated measure.

I posted one more reply that is for the calculated column.

 

Picture3.png

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you so much! Your solution is very helpful!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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