Forum Discussion
Identify row with same ID (condition: 24 hours)
- 9 years ago
Hi,
Please try this formula as a calculated column. If you want to change the time duration, just change the DeadLine part.
Réit1j = VAR DeadLine = 'DATA SVI_2'[CallTime] + 1 RETURN IF ( CALCULATE ( COUNTROWS ( 'DATA SVI_2' ), FILTER ( 'DATA SVI_2', 'DATA SVI_2'[CallTime] > EARLIER ( 'DATA SVI_2'[CallTime] ) && 'DATA SVI_2'[CallTime] <= DeadLine && 'DATA SVI_2'[CallCLID] = EARLIER ( 'DATA SVI_2'[CallCLID] ) ) ) >= 1, 1, 0 )Best Regards!
Dale
Hi aymeric_kolan,
I have a few questions.
- “a row with the same InboundVoiceCalls_CallId (ID)”. I can’t see any rows with the same InboundVoiceCalls_Callid(ID) in the sample.
- “more than once in 1 day” and “in the next 24 hours”. Do you mean 00:00:00 to 23:59:59 or the next 24 hours from a special time.
If these questions were clarified, the formula could be easy.
Best Regards!
Dale
1. You're right. In fact, InboundVoiceCalls_CallId is a system ID but we have to check on CallCLID (CallCLID is the phone number).
2. Good question, I think we need to look the day after.
For example, if a have a row at 10:00:00 on Monday, we want to check until 23:59:59 on Thusday and have 1 if there is another row with same CallCLID at 18:50:00 on Thusday.
Thank you ! :)
- v-jiascu-msft9 years agoMicrosoft Employee
Hi,
Please try this formula as a calculated column. If you want to change the time duration, just change the DeadLine part.
Réit1j = VAR DeadLine = 'DATA SVI_2'[CallTime] + 1 RETURN IF ( CALCULATE ( COUNTROWS ( 'DATA SVI_2' ), FILTER ( 'DATA SVI_2', 'DATA SVI_2'[CallTime] > EARLIER ( 'DATA SVI_2'[CallTime] ) && 'DATA SVI_2'[CallTime] <= DeadLine && 'DATA SVI_2'[CallCLID] = EARLIER ( 'DATA SVI_2'[CallCLID] ) ) ) >= 1, 1, 0 )Best Regards!
Dale
- aymeric_kolan9 years agoFrequent Visitor
Thank you v-jiascu-msft.
It works :)
- v-jiascu-msft9 years agoMicrosoft Employee
My pleasure! I am so glad it helps.
Best Regards!
Dale