How to compare the string value in the same column for 2 separate days

Hi, I have a dataset that has a datetime column A and a string column B. I want to know if the values in column B today appeared yesterday. Is this something I can realize using calculated field? I try to use in function but it needs an array of strings. I’m not sure how to create an array that has all the strings in yesterday in column B.
Or is there an alternative way to do this? Thanks a lot

Hi Tony,
Is it possible for you to share a couple of rows of sample data? That will help with trying to find a solution.
Thank you.

Hi Asem,

Sure, we want to know what tests on 08/24/2023 are also triggered on 08/23/2023, and in this example, we have test1, test3, test4, test6, test 7and test8.
Thanks a lot!

|A |B|
|2023-08-23 11:32:26|test1|
|2023-08-23 8:18:11|test2|
|2023-08-23 7:24:01|test3|
|2023-08-23 22:35:01|test4|
|2023-08-23 7:35:25|test5|
|2023-08-23 22:58:52|test6|
|2023-08-23 7:24:58|test7|
|2023-08-23 14:58:29|test8|
|2023-08-24 11:32:26|test1|
|2023-08-24 8:18:11|test3|
|2023-08-24 7:24:01|test4|
|2023-08-24 22:35:01|test6|
|2023-08-24 7:35:25|test7|
|2023-08-24 22:58:52|test8|
|2023-08-24 7:24:58|test9|
|2023-08-24 14:58:29|test10|

You can do this with a calculated field.
ifelse(distinctCountOver(Date, [Test], PRE_AGG)>1, ‘Yes’, ‘No’ )

.

See this post for reference.

1 Like

This is absolutely brilliant! Thank you so much Asem

1 Like