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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Discount count based on 15 minute interval

Hi all,

Below is a sample of the data that was given to me.  The goal (which seems pretty simple) is to count the number of times a customer opened an email sent to them using the Opened On date/time stamp.  The crux is there has to be a 15-min interval between the opened times.  

 

So in the example below, Customer A shows they opened the email 5x on 11/14 but it should only be counted 3x.  The first and second time it was opened (at 9:37am and 9:38am) only counts once and the lat two times (at 11:56 and 11:56 AM) also only counts once.    Customers B and C would have longer intervals between the times they opened the email so each one would be counted.

 

Do I need to create a date/time table first to get the intervals? 

 

Thank you for any help in advance.

 

test.png

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may refer to the following post and use DATEDIFF.

https://community.powerbi.com/t5/Desktop/Finding-the-previos-occurrence-within-same-table-based-on-o...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may refer to the following post and use DATEDIFF.

https://community.powerbi.com/t5/Desktop/Finding-the-previos-occurrence-within-same-table-based-on-o...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi

Thank you for that.  I was actually able to create a similar measure, just took a little while to find the right combination. I'm halfway thru the solution but I think I might finally have it.  I'll post again with the solution once I have it all figured out.

 

Thank you.

Anonymous
Not applicable

Also the title of my topic wasn't supposed to say DISCOUNT.  It was supposed to say DISTINCT COUNT but apparently I combined the two words into one!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.