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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors