- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to get the first and last value based on a date and hour
So i have a colums where i get the date and hour, for example on 01/21 i can have 3 values in diferrent hours, like 01/21 10:00 ; 01/21 09:20 ; 01/21 13:05, and i need to get only the 01/21 09:20 wich is the first date that day, and the same but with the last date
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm guessing you're already using a plain date column as a slicer or something like that in order to select the date. If not, may I suggest doing that? From there the first would just be MIN(TableName[DateTimeColumn]) and the last would be MAX(TableName[DateTimeColumn]).
Unless you're trying to do this as another column rather than a measure, in which case I'm not sure how you would want that to work. Would you want all three rows for 1/21 to show the 9:20 time?
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm guessing you're already using a plain date column as a slicer or something like that in order to select the date. If not, may I suggest doing that? From there the first would just be MIN(TableName[DateTimeColumn]) and the last would be MAX(TableName[DateTimeColumn]).
Unless you're trying to do this as another column rather than a measure, in which case I'm not sure how you would want that to work. Would you want all three rows for 1/21 to show the 9:20 time?
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the help, I've been using power bi like a week ago, so I'm learning all the comands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can sympathize. I've been using it since the day it was released to the public and I'm still learning. 😁
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
10-10-2024 03:01 PM | |||
02-27-2024 08:42 AM | |||
08-16-2024 12:23 AM | |||
02-17-2024 11:15 AM | |||
05-16-2024 08:47 AM |
User | Count |
---|---|
141 | |
115 | |
84 | |
63 | |
48 |