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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Identify time intervals with n number of records

Hello All,

I have a requirement to find all the 10 minute time intervals with more than 2 records, from a dataset.

My dataset looks like,

EventTime

01/01/2020 00:01:00

01/01/2020 00:02:00

01/01/2020 00:03:00

01/01/2020 00:12:00

01/01/2020 00:13:00

01/01/2020 00:14:00

01/01/2020 00:15:00

01/01/2020 00:23:00

01/01/2020 00:24:00

01/01/2020 00:48:00

01/01/2020 00:49:00

01/01/2020 00:58:00

 

I want output like 

 

EventTime                       Count

01/01/2020 00:01:00       3

01/01/2020 00:02:00       2

01/01/2020 00:03:00       2

01/01/2020 00:12:00       4

01/01/2020 00:13:00       3

01/01/2020 00:14:00       3

01/01/2020 00:19:00       3

01/01/2020 00:23:00       2

01/01/2020 00:24:00      1

01/01/2020 00:48:00      2

01/01/2020 00:49:00      2

01/01/2020 00:58:00      1

 

My dataset is very large and applying any measure to identify the nth record is not working.

 

Any help on this issue is greatly appreciated.

 

Thank you.

GR

 

 

1 ACCEPTED SOLUTION
JarroVGIT
Resident Rockstar
Resident Rockstar

Use this as a calculated column:

CalculatedColumn = 
VAR _curEventTime = Table2[EventTime]
VAR _tmpTable = FILTER(Table2, Table2[EventTime]>= _curEventTime && Table2[EventTime] < _curEventTime + 10/(24*60))
RETURN
COUNTROWS(_tmpTable)

Result:

image.png

If any questions, let me know!

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂





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

Proud to be a Super User!




View solution in original post

4 REPLIES 4
JarroVGIT
Resident Rockstar
Resident Rockstar

Use this as a calculated column:

CalculatedColumn = 
VAR _curEventTime = Table2[EventTime]
VAR _tmpTable = FILTER(Table2, Table2[EventTime]>= _curEventTime && Table2[EventTime] < _curEventTime + 10/(24*60))
RETURN
COUNTROWS(_tmpTable)

Result:

image.png

If any questions, let me know!

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂





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

Proud to be a Super User!




Anonymous
Not applicable

Thank you djerro123! I tried your solution, but my dataset being very large, Power BI Desktop has been processing for morethan 12 hours now, and is not yet done.  Do you know of any alternatives? 

Hi @Anonymous ,

When you have a massive dataset, you might want to explore other ways to enrich your data. For example, you could use Azure Synapse Analytics to store your data and a Azure Databricks workspace to analyze this on a Spark cluster. In your usecase, where the dataset consist out of millions of rows (billions?), that is highly recommendable and faster. 

 

How big is the dataset anyway? (in terms of Rows and GB?)





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

Proud to be a Super User!




Anonymous
Not applicable

Hello @JarroVGIT 

My Dataset consist of 3 million records. I will check out the options you mentioned. 

Thanks for your consistent support to the Power BI community!

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.