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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors