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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jwi1
Post Patron
Post Patron

search for same value within timeframe

Good day,

I have the following question, for which I need some help.

Below you see a duplicate value.

This duplicate vaue was entered in the database within 2 seconds.

I want to have an extra colum which gives me a "yes" if the same value was entered in the database within 2 seconds.

And, if possible, I want to have the possibility to set the timeframe from 2 to 3 (or more) seconds manually (filter?).

Your help is highly appreciated!

Regards, John

 

Knipsel.JPG

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

Drag only value to the table visual and write these measures

Max date_time = MAX(Data[date_time])

Min date_time = MIN(Data[date_time])

Difference = [Max date_time]-[Min date_time]

Entered within 2 seconds = IF([Difference<=TIME(0,0,2),"Yes","No")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

amitchandak
Super User
Super User

@jwi1 , New columns in table

last date = maxx(filter(Table,Table[value] =earlier(Table[value]) && Table[Date] <earlier(Table[Date])),Table[Date])
Date diff = if(abs(datediff([last date],[Date],second)),<=2, "Yes","No")

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@jwi1 , New columns in table

last date = maxx(filter(Table,Table[value] =earlier(Table[value]) && Table[Date] <earlier(Table[Date])),Table[Date])
Date diff = if(abs(datediff([last date],[Date],second)),<=2, "Yes","No")
Ashish_Mathur
Super User
Super User

Hi,

Drag only value to the table visual and write these measures

Max date_time = MAX(Data[date_time])

Min date_time = MIN(Data[date_time])

Difference = [Max date_time]-[Min date_time]

Entered within 2 seconds = IF([Difference<=TIME(0,0,2),"Yes","No")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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