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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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