I am working with some sales data that each transaction has multiple stages. say stage A, B, C, D...
In the perfect world, each transaction needs to go to each stage and I want to calculate the difference the transaction stays at each stage.
Say the data might look like this:
transaction_id stage updated_date
1 A 2015-01-01
1 B 2015-01-02
1 C 2015-01-05
1 D 2015-01-06
I want something like:
transaction_id stage time_spent
1 AB 1 day
1 BC 3 days
1 CD 1 day
Then I will be able to analyze the time spent at each stage and look at the histogram or distribution. However, the only thing I can find is the function datediff.
Can anyone show me how to achieve this in Tableau?