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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Rainman
New Member

Finding total between a time minus a set duration in minutes

I am new to Powerbi and have a table which has two columns date/time and depth of rainfall. I need to find the amount of rain that has fallen over the previous X minutes for each day/time i.e the previous 5 mins. Data bins are not suitable as the times are not exact and include seconds.  There are a number of different values for X minutes.  I have looked at the calculate and sum dax formulas for measures and I am struggling to find the answer.  There does seem to be ways to do it for other metrics but can't see for minutes. If you could point me in the correct direction that would be really appreciated. Thank you.

2 REPLIES 2
Rainman
New Member

Hi @some_bih,

Thanks for that, will check it out. Much appreciated.

M

some_bih
Super User
Super User

Hi @Rainman did you use DATEDIFF function? Check example. Hope this help.

https://learn.microsoft.com/en-us/dax/datediff-function-dax 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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