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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jhauw74
Frequent Visitor

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

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.