Compare one value with values from other rows

Hello,
I have the following data:


I’m trying to create a calculated field to flag when marketing campaigns emails from different campaigns will be sent less than 2 weeks apart. e.g.: in this example, the Rose email2 and Shamrock email1 are less than 2 weeks apart.

I’ve tried this:
ifelse(
datediff(Email1, Email2, ‘DD’) < 14, concat(Marketing_campaign, ’ (Email1) overlaps with ‘, Marketing_campaign, ’ (Email2)’),
datediff(Email1, Email3, ‘DD’) < 14, concat(Marketing_campaign, ’ (Email1) overlaps with ‘, Marketing_campaign, ’ (Email3)’),
datediff(Email2, Email3, ‘DD’) < 14, concat(Marketing_campaign, ’ (Email2) overlaps with ‘, Marketing_campaign, ’ (Email3)’),
‘No Overlap’
)

but it only perform the check for each individual row, which is exactly the use case I’m not interested in. I only want to know if two different campaigns have emailed scheduled for less than 2 weeks apart.
Is this something I could do on QuickSight?

Thanks

Hello @loupelou :smiley:
Unfortunately, due to the limitations of qs in handling cross-row calculations directly, a solution involving external data processing might be necessary. If you have access to a data engineering team or tools, they might be able to assist in preparing the data accordingly.

Hi @loupelou,
It’s been awhile since we last heard from you, did you have any additional questions regarding your post or was the solution provided above sufficient in helping your case?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @loupelou,
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!