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

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-one/m-p/342607#M153516

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-one/m-p/342607#M153516

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
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.