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

Reply
Topjacket
Helper I
Helper I

Column to return earliest date based on another column

Hi

 

I have a column "Case Month and Year" which lists the date of a case, I then have another column "Version Code". I would like a column that will will return the earliest date for the Version code in each row of data.

 

I have tried adding a new table with a distinct list of version codes but no matter which way I try I am just getting the earliest date of the entire dataset, not the earliest date spesific to the Version code.

 

I hope this is something easy! Any help would be great,

 

Thanks 

 

 

1 ACCEPTED SOLUTION
Topjacket
Helper I
Helper I

Hi Tamerj1

 

Thanks very much for the super quick reply. I think I must have entered something wrong but this was also returning the earliest overall date for each record rather than the version code earliest date.

 

I have ended up creating a new table of distinct versions and then applied the following DAX which seems to be working

 

Earliest Record = MaxX( FILTER('Table',[Version Code] = EARLIER('Table'[Version Code])),'Table'[CaseMonthAndYear])
 

View solution in original post

2 REPLIES 2
Topjacket
Helper I
Helper I

Hi Tamerj1

 

Thanks very much for the super quick reply. I think I must have entered something wrong but this was also returning the earliest overall date for each record rather than the version code earliest date.

 

I have ended up creating a new table of distinct versions and then applied the following DAX which seems to be working

 

Earliest Record = MaxX( FILTER('Table',[Version Code] = EARLIER('Table'[Version Code])),'Table'[CaseMonthAndYear])
 
tamerj1
Super User
Super User

Hi @Topjacket 

create a new calculated column:

Earliest Date =
MINX (

CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Version Code] ) ),

'Table'[Case Month and Year] 

)

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.