7 Replies Latest reply on May 7, 2018 6:29 AM by Okechukwu Ossai

# Lookup previous dimension calculation

I have a data set where employees belong to a particular team. Their team can change month to month however. I need a calculation that returns what the employee's previous team value was in the previous month. Excel attached for understanding.

• ###### 1. Re: Lookup previous dimension calculation

Hi Andre,

Is this what you are looking for?

Hope this helps.

Ossai

1 of 1 people found this helpful
• ###### 2. Re: Lookup previous dimension calculation

This was exactly what I needed Ossai! Now I need help summarizing the information because this is a bit too granular. While this would be beneficial if we were looking at a few employees, a senior leader in my company would want to know how many employees moved into a team over time rather than the movements of specific employees.

The table calculation manipulation isn't something that I've mastered so how would I make it so that on the columns I had months (MY specifically) and the rows had team (current as per the month observed) and the previous team. Below is a snippet of what I would need (replace the word "Tier" with "Team". Also showing a screenshot of the summary I'm interested in.

• ###### 3. Re: Lookup previous dimension calculation

You're welcome Andre. I can see some numbers under columns Jan-18, Feb-18 and Mar-18. What do those numbers represent? Are they count of employees?

• ###### 4. Re: Lookup previous dimension calculation

You're correct. That represents the distinct count of employees that fit the scenario.

• ###### 5. Re: Lookup previous dimension calculation

Hi Andre,

I looked at this quickly but was unable to make it work. The total count of employees are not summing up for months with more than 1 employee. The problem is that [Previous Team] is in the view, breaking up the count of employees. I could look at it more when I get the chance but suggest other community members review it to see if I've missed anything obvious.

I don't recommend calling out community members, but for this one, you could ask Shinichiro Murakami to help you check if there is a possible quick fix.

Ossai

• ###### 6. Re: Lookup previous dimension calculation

I'm thinking we need to use a LOD expression along the lines of {INCLUDE Previous Team: COUNTD([Name])} and removing the previous team dimension from the view. I'll try this out and advise the outcome.

• ###### 7. Re: Lookup previous dimension calculation

LOD expressions cannot contain table calculations at the moment in Tableau. That is why I didn't go that route. It will be so convenient if Tableau can make that possible in future releases.