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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors