0

I'm working in Tableau. Here is the sample of data EXAMPLE

ID     Start Date      End Date
1        2011            2012
2        2011            2013
3        2012            2012
4        2010            2013
5        2012            2012

In final I need to have count of how many IDs started and ended by years.

For this example it should look like this:

Year   Started    Ended
2010      1         0
2011      2         0
2012      2         3
2013      0         2

Maybe you have any thoughts how can I reach this result? I'm working in Tableau desktop/prep-builder

Robert
  • 7,394
  • 40
  • 45
  • 64
Taras
  • 11
  • 1
  • this will be easier if you pivot to have the columns ID, Date, Action (where Action will be either "Start" or "End"). So you'll have two rows in your pivoted view of the data for each row in the original (or one row if there is no end yet). You can pivot from the Tableau data source page or from Tableau Prep – Alex Blakemore Jul 12 '23 at 16:48
  • @AlexBlakemore, Thanks, this worked for me. – Taras Jul 13 '23 at 12:02

0 Answers0