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
Annemie19
Helper II
Helper II

Select Next date in column

Hi There, 

 

I want to create a measure which gives the next date in the column for the entityID in that row. For instance, in the table below, I want a new column which, let's say entity ID 92 the date is 29/06/2021 then it needs to give the date 29/09/2021. 

 

Annemie19_0-1598955602924.png

 

1 ACCEPTED SOLUTION
AntrikshSharma
Super User
Super User

@Annemie19  You can use this:

 

Column = 
VAR CurrentRowEntity = Anne[EntityID]
VAR CurrentRowDate = Anne[MeasurementDate]
VAR SameRows =
    FILTER (
        Anne,
        Anne[EntityID] = CurrentRowEntity
            && Anne[MeasurementDate] > CurrentRowDate
    )
VAR Result =
    MINX ( SameRows, Anne[MeasurementDate] )
RETURN
    IF ( Result = BLANK (), CurrentRowDate, Result )

1.PNG

View solution in original post

2 REPLIES 2
AntrikshSharma
Super User
Super User

@Annemie19  You can use this:

 

Column = 
VAR CurrentRowEntity = Anne[EntityID]
VAR CurrentRowDate = Anne[MeasurementDate]
VAR SameRows =
    FILTER (
        Anne,
        Anne[EntityID] = CurrentRowEntity
            && Anne[MeasurementDate] > CurrentRowDate
    )
VAR Result =
    MINX ( SameRows, Anne[MeasurementDate] )
RETURN
    IF ( Result = BLANK (), CurrentRowDate, Result )

1.PNG

amitchandak
Super User
Super User

@Annemie19 , try a new column like

minx(filter(table, [entityID] = earlier([entityID]) && [measuredate] >earlier([measuredate])),[measuredate])

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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.