AnalyzeThis
AnalyzeThis

Reputation: 49

Difference Between Dates in the Same Dimension Using Tableau

I am working on a project for work that tracks the movement of customers within the starting stages of our funnel. There are three stages that I am looking at FT (First Touch), Engaged Lead, and MQL. For each contact ID, I want to know the number of days it took a lead to travel from FT, Engaged Lead, and MQL. Also, in some instances there are leads that jump from FT to MQL directly. The three stages are filters within a dimension titled "Stage". I only have one date dimension, titled "Transition Date". How do I create a calculated field that will give me the number of days it takes a lead to move through each stage?

Essentially, I would like to create a column between each stage to show me the number of days between each stage. This would be easy to do in excel, but this needs to be done in Tableau since we have a lot of data.

enter image description here

Upvotes: 0

Views: 518

Answers (1)

Siva
Siva

Reputation: 9101

since you are getting data for every stage from a single date field you need to write separate calculated fields to extract date for a specific stage and then subtract.

FT Date

if stage = "FT"
then Trasition Date
end

MQL Date

if stage = "MQL"
then Trasition Date
end

Engaged Lead date

if stage = "Engaged Lead"
then Trasition Date
end

Now create one more calculated field to take difference.

DateDiff('day',[FT Date],[MQL Date])

Hope this helps

Upvotes: 2

Related Questions