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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
MarcoBeca
Regular Visitor

Get number of events within 60 minutes from each event

Hi everybody,

 

I need some help with a DAX.  

I have a table with following columns:

  • Date time 
  • Card Id
  • Contract Id
  • EventType

I need to produce a table showing the number of events within 60 minutes from each event with eventtype = 3, grouped by card id, contract id and eventtype. 

I can only use DAX - not possible to edit dataset.

Your help will be much appreciated!

2 REPLIES 2
Anonymous
Not applicable

Hi @MarcoBeca ,

 

What time do you want to compare Date time with?

You may consider to create a measure like below:

 

new_table = summarize(filter(table,eventtype=3&&datediff(date time,time2,MINUTE)<=60),card id, contract id,"count",countrows(table))

 

 

Best Regards,

Jay

Hi Jay,

 

I'll be testing out your solution and I will let you know in the next days. thank you for your support!

 

Marco

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors