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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Super User

@Anonymous , 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

View solution in original post

2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

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
Super User

@Anonymous , 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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.