Forum Discussion
Anonymous
7 years agoNot applicable
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?
Can you not just use MIN?
CALCULATE(MIN('Table'[Date].[Date]), FILTER('Table', 'Table'[TestID] = 'Table2'[TestID]))
2 Replies
- CmcmahanResident Rockstar
Can you not just use MIN?
CALCULATE(MIN('Table'[Date].[Date]), FILTER('Table', 'Table'[TestID] = 'Table2'[TestID]))- AnonymousNot applicable
this did the trick, thank you!