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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
M_SBS_6
Helper V
Helper V

Max Datetime flag

Hi, 

I have records which have a datetime field called called app_in_datetime

 

I'd like to create a new field which will flag the records of the latest datetime.

 

Example below.

app_in_datetime.         Latest_app_in

01/01/2023 12:34:45.    N

01/01/2023 13:53:34.    Y

 

Any idea how I would go about doing this please? 

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Assuming you have an App ID column and you want a Y or an N against each App ID, try this calculated column formula

Result = if(Data[app_in_datetime]=calculate(max(Data[app_in_datetime]),filter(Data,Data[App ID]=earlier(Data[App ID]))),"Y","N")

Hope this helps.


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

@M_SBS_6 , Try a new column like

 

if([app_in_datetime] = max(Table[app_in_datetime]) , "Y", "N" )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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