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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
jhauw74
Helper I
Helper I

Getting the maximum date from rows

Hi - I am stuck on how I can get the max date based on the rows in a table :

 

jhauw74_0-1691030020846.png

I'd like to be able to identify that max date row as 1 and the rest as 0.

Beent trying using earlier but doesn't seems to work - any help greatly appreciated.

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

Flag of max date = 1*(Data[Effective Date]=calculate(max(Effective date),filter(Data,Data[Employee ID]=earlier(Data[Employee ID])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
jhauw74
Helper I
Helper I

Thank you @Ashish_Mathur the formula works 😀

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

Flag of max date = 1*(Data[Effective Date]=calculate(max(Effective date),filter(Data,Data[Employee ID]=earlier(Data[Employee ID])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ahmedx
Super User
Super User

pls show expected output

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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