5 Replies Latest reply on Apr 23, 2019 8:39 AM by Ewald Hofman

# Calculating number of departures, entries and changes

Hello Tableau community, I need help to perform some calculations.

For example I have a list of people per month; I have for the month of February 2019 there were 862 people, in January of that same year there were 860 people, there is a difference of 2 people. How to show in Tableau those 2 new PersonIDs that were not in the previous month?

In December of the year 2018 there were 856 people, how do I show that number of people who left those months?,

From that same amount of PersonID I would like to determine how many departments changed, to be able to select from a month to compare with the previous month:

I attach a workbook with test data.

• Añadir a la guía de conversación
• No hay listas de palabras para Inglés -> Español...
• Crear una nueva lista de palabras...
• Copiar
• ###### 1. Re: Calculating number of departures, entries and changes

You can join the table with itself, and create a join on PersonID and the expression

DATETRUNC('month', [Period]) = DATETRUNC('month', DATEADD('month', -1, [Period (Analysis1)]))

To see if the person was on the list last month, you can use the expression "NOT ISNULL([PersonID (Analysis1)])"

1 of 1 people found this helpful
• ###### 2. Re: Calculating number of departures, entries and changes

Thank you @Ewald Hofman. And for the number of people who left compared to the previous month, do something similar?

• ###### 3. Re: Calculating number of departures, entries and changes

Correct

• ###### 4. Re: Calculating number of departures, entries and changes

I did another calculation to get people who changed departments:

• ###### 5. Re: Calculating number of departures, entries and changes

If you also want to track department changes, then add the department to the link of the datasources