cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
saham123
Frequent Visitor

For the streaming data find the row count of last 5 minutes vs 5 minutes before that

Hi Team,

 

I am working on power bi report for streaming data, need help to find the row count of last 5 minutes vs 5 minutes before that

 

Thanks

 

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@saham123 , You can try measure like these

 

last 5 =countrows(filter(Table, Table[Datetime] > now() - time(0,5,0) && Table[Datetime] <=now()))

 

last 5 before 5 countrows(filter(Table, Table[Datetime] > now() - time(0,10,0) && Table[Datetime] <=now()-5))

 

 

in case there is filter on date time, use all(Table[datetime]) in place of Table in filter



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Eyelyn9
Community Support
Community Support

Hi @saham123 ,

 

Could you please tell me  if your problem has been solved by @amitchandak 's post? If it is, kindly Accept it as the solution to make the thread closed. More people will benefit from it.

 

If not , please provide me with more details about your table and your expected output or share me with your pbix file after removing sensitive data.

 

Best Regards,
Eyelyn Qin

amitchandak
Super User IV
Super User IV

@saham123 , You can try measure like these

 

last 5 =countrows(filter(Table, Table[Datetime] > now() - time(0,5,0) && Table[Datetime] <=now()))

 

last 5 before 5 countrows(filter(Table, Table[Datetime] > now() - time(0,10,0) && Table[Datetime] <=now()-5))

 

 

in case there is filter on date time, use all(Table[datetime]) in place of Table in filter



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors