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
Anonymous
Not applicable

Identify the latest date in a date column and return specific value

Hi,

 

I'd like to add a column to my table that will identify if the result in column [MonthStart] is the latest date.  Here is an example of my data table:

 

Capture.PNG

 

I'd like to add this column to the right.  Essentially, if the date in column [MonthStart] is the latest return "Latest", if not then return "Not the Latest".

 

The MonthStart column is already formatted as a date data type:  (mmmm yyyy)

 

an you assist me in the DAX?

 

 

 

Thank you,

Andrew

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

Did you mean to check the current date if it is the last one of the current category?

If that is the case, please take a look at the following formula if helps:

Calcualte column =
VAR temp =
    ADDCOLUMNS (
        CALCULATETABLE (
            VALUES ( Table[Month Start] ),
            FILTER ( Table, [Car Make] = EARLIER ( Table[Car Make] ) )
        ),
        "Date", DATEVALUE ( "1 " & [Month Start] )
    )
RETURN
    IF (
        Table[Month Start] = FORMAT ( MAXX ( temp, [Date] ), "MMM yyyy" ),
        "Latest",
        "Not the Latest"
    )

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

Did you mean to check the current date if it is the last one of the current category?

If that is the case, please take a look at the following formula if helps:

Calcualte column =
VAR temp =
    ADDCOLUMNS (
        CALCULATETABLE (
            VALUES ( Table[Month Start] ),
            FILTER ( Table, [Car Make] = EARLIER ( Table[Car Make] ) )
        ),
        "Date", DATEVALUE ( "1 " & [Month Start] )
    )
RETURN
    IF (
        Table[Month Start] = FORMAT ( MAXX ( temp, [Date] ), "MMM yyyy" ),
        "Latest",
        "Not the Latest"
    )

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

hi @Anonymous 

 

Try this

 

_Latest_Flag = if(('Table'[MonthStart] = FORMAT(NOW(),"mmmm yy")),"Latest","Not Latest")
 
Thanks!
 
PS: Please accept the post if you agree with solution!

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