The data structure resembles this where state visited follows a sequential order of: Hawaii -> California -> Texas -> New York.
| Name | State | Date |
|:-----------|------------:|:------------:|
| Alice | Hawaii| 1/1/2019 |
| Alice | California| 1/3/2019 |
| Alice | Texas| 1/5/2019 |
| Alice | New York| 1/7/2019 |
| Bobby | Hawaii| 3/20/2019 |
| Bobby | California| 3/23/2019 |
| Bobby | Texas| |
| Bobby | New York| |
| Carl | Hawaii| 2/10/2019 |
| Carl | California| 2/12/2019 |
| Carl | Texas| 2/12/2019 |
| Carl | New York| |
I want to show only the date for the people who HAVE not yet been to New York but visited every other place in Tableau.
In this case, this would be Carl since he visited Hawaii, California, AND Texas, but not yet New York.
Alice would not be shown since she already visited New York and Bobby should not be shown since he hasn't been to Texas yet
I tried making a calculated field and dragging that to filter.
IF (ISNULL([Date]) AND [State] = "New York") AND
(NOT ISNULL([Date]) AND
([State] = "Hawaii" OR
[State] = "California" OR
[State] = "Texas"))
THEN
[Date]
END
I expect the output calculated field to return me the following DATE column:
| Name | State | Date |
|:-----------|------------:|:------------:|
| Alice | Hawaii| |
| Alice | California| |
| Alice | Texas| |
| Alice | New York| |
| Bobby | Hawaii| |
| Bobby | California| |
| Bobby | Texas| |
| Bobby | New York| |
| Carl | Hawaii| 2/10/2019 |
| Carl | California| 2/12/2019 |
| Carl | Texas| 2/12/2019 |
| Carl | New York| |
but all I got was null everything so something in my logic is wrong but I don't know what.