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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
alykhalifa
Frequent Visitor

Selecting First Date and Time

I have a column of datetime data and I am trying to select the first date after filtering the table. I am using the following calculated column formula:

 

First Date = CALCULATE(FIRSTDATE('Table'[Date].[Date]), FILTER('Table', 'Table'[TestID] = 'Table2'[TestID]))
 
The data in the Date column is Date/Time with the format 'M/D/Y H:M:S'
 
This works for selecting the first date, but seems to be ignoring the time data in the Date column. It returns the correct day, but sets the time to 12:00:00. Is there an equivelent to FIRSTDATE() that will return the date and  time?
 
 
1 ACCEPTED SOLUTION
Cmcmahan
Resident Rockstar
Resident Rockstar

Can  you not just use MIN?

 

 CALCULATE(MIN('Table'[Date].[Date]), FILTER('Table', 'Table'[TestID] = 'Table2'[TestID]))

 

View solution in original post

2 REPLIES 2
Cmcmahan
Resident Rockstar
Resident Rockstar

Can  you not just use MIN?

 

 CALCULATE(MIN('Table'[Date].[Date]), FILTER('Table', 'Table'[TestID] = 'Table2'[TestID]))

 

this did the trick, thank you!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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