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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
harryfasb6000
Frequent Visitor

How do I get Max Timestamp for Each Day using DAX

I have a table that updates 1-3x a day. Does anyone know how I can return only the max timestamp for each day using DAX. Thanks.

 

Max Timestamp per Day.png

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @harryfasb6000 

You could use this formula to create a column 

Column = 
CALCULATE(MAX('Table'[Datetime]),FILTER('Table',FORMAT([Datetime],"yyyy/MM/dd")=FORMAT(EARLIER([Datetime]),"yyyy/MM/dd")))

or use this formula to create a measure

Measure = CALCULATE(MAX('Table'[Datetime]),FILTER(ALLSELECTED('Table'),FORMAT([Datetime],"yyyy/MM/dd")=FORMAT(SELECTEDVALUE('Table'[Datetime]),"yyyy/MM/dd")))

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-lili6-msft
Community Support
Community Support

hi  @harryfasb6000 

You could use this formula to create a column 

Column = 
CALCULATE(MAX('Table'[Datetime]),FILTER('Table',FORMAT([Datetime],"yyyy/MM/dd")=FORMAT(EARLIER([Datetime]),"yyyy/MM/dd")))

or use this formula to create a measure

Measure = CALCULATE(MAX('Table'[Datetime]),FILTER(ALLSELECTED('Table'),FORMAT([Datetime],"yyyy/MM/dd")=FORMAT(SELECTEDVALUE('Table'[Datetime]),"yyyy/MM/dd")))

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Try this

IF(CALCULATE(MAX(Table1[date]),ALLEXCEPT(Table1,Table1[date]))=MAX(Table1[date]),1,0)

And add this measure to visual level filter ans set it to 1.

Thanks. Tried that but couldnt get to work. Do I need to split the column into two ... date, time?

Take out another date column out of using

date = format(table[datetime],"dd/mm/YYYY")

 

and then on visual take max of date time. If you want populate in table a new column then use

maxx(filter(table,table[date]=earlier(table[date])),table[datetime])

 

But this also needs date

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Yes that will make it much easier.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.