1
votes

I have a simple data set listed below

ID
Date
Status (String)

I have 2 parameters setup [Start Date] and [End Date] What the end goal is to do is display a list of any [ID] where the [Status] has changed between the [Start Date] and [End Date]. I really don't care about the in-between dates, just where [ID][Start Date][Status] != [ID][End Date][Status]. I'm having a lot of trouble figuring out any thing I can use to do this in tableau, any suggestions would be appreciated.

EDIT: Really if any one can help me get a calculated field that equals the Starting status, I can probably figure the rest out. Thanks

1
Does your data have exactly one row for each date for each ID? Or do you Holes — I.e. dates where there are no data Rows for some Ids? Do you have multiple records on the same date for the same ID? The solution complexi6varies depending on answers - Alex Blakemore
[ID][Start Date][Status] != [ID][End Date][Status] this is not sufficient, can you post with real data? - Siva
@AlexBlakemore There will never be more that 1 row per ID per Date, there could potentially be Dates with no row for some IDs, but rarely - keepitreall89

1 Answers

1
votes

You can start by experimenting with a few simple calculated fields, although things might get a bit trickier later.

Try defining a field called [Start Date Status] defined as if [Date] = [Start Date] then [Status] end Define [End Date Status] similarly. (the brackets are not part of the name)

Then define a field called [Status Changed] as min([Start Date Status]) <> min([End Date Status])

You can then use these in different ways — for example put Id on Rows and Status Changed on Text.

You can explore extensions to, say, handle Ids that don’t have a record for the start or end date