Let’s say you are the people manager at ACME Inc. You are looking staff list for the months – January and February 2017. You see that we had 4,000 employees in Jan and 4,200 employees in Feb. So what is the churn?
- Is it just 200?
- Or is it the sum of people who left and who joined?
- What if you want to find out how many people moved to new designations / departments or groups?
You see, churn is tricky to figure out.
So why not invite the pros? ie Power Query.

Side note: You could also calculate churn in Excel (using formulas) or in SQL (by using long queries and unions with a boat load of joins)
Setting up your data – Churn analysis
The first step is to set up two sets of data (one for each point in time). Make sure that you include only relevant columns. Let’s say we go with below layout.

For the sake of simplicity, let’s call these tables thismonth and lastmonth. You can include the data date columns, but they are not necessary for the analysis.
Define churn
We can categorize churn in to one of these 6 levels.
- New employees
- Exits
- People who moved to a new group
- People who moved to a new branch
- People who moved to a new designation
- No changes
Figuring out the churn – Power Query
Here is the process to calculate the churn using Power Query.
- We create a third query by merging two datasets (thismonth and lastmonth) on employee number as Full Outer join (think of this as A union B in sets – ie any employee present in either months will be included)
- We define a custom column in this new query, called status. It will have
- New employees if emp number is null in last month’s column
- Exit if emp number is null in this month’s column
- New group if thismonth.group <> lastmonth.group
- New Branch if thismonth.branch <> lastmonth.branch
- New Designation if thismonth.designation <> lastmonth.designation
- No changes else
- We delete all rows with no changes (as we are only interested in churn)
- Load this data to Excel
Figuring out employee churn – Power Query lesson video
Since the process is somewhat technical and confusing, I made a video explaining everything in detail. Check it out below.
You can watch this video on our youtube channel too.
Download Example Workbook
Click here to download example workbook. You must have Power Query 2013 or Excel 2016 to customize anything.
More on Power Query
Power Query is awesome. If you haven’t explored its power, check out below tutorials and get started.
- Introduction to Power Query
- Unpivot data quickly with Power Query
- How to import web data to Excel using Power Query
- Recommended training: Power Query by Ken Puls
How do you calculate churn?
As mentioned earlier, we can use either Excel formulas or SQL to calculate churn. If I am only interested in high-level churn (ie entries and exits), I use a simple formula. But for anything more than that, I prefer Power Query or SQL (as PQ is not be available in all versions of Excel)
What about you? How do you calculate and analyze churn? Please share your approach and tips in the comments.

















9 Responses to “Show forecast values in a different color with this simple trick [charting]”
While this works in a pinch, it clearly "lightens" the colors of the entire chart. Depending on where you use this, it will be blatantly obvious that you don't know what you are doing and present a poor looking graph.
Why not separate the data into different segments when charting and have as many colors as you have data points? You might have to create a new legend and/or repeat the chart in "invisible ink", but it would be cleaner and more consistent when new or updated data becomes available.
While I think I agree that doing it "properly" via a second series is preferable, I don't necessarily agree that making the entirety of the "future" (data, gridlines, and even the axis) semi-transparent is "poor looking". I think it could be seen as adding more emphasis to the "future-ness" of the forecast data.
In short, it's another tool for the toolbox, even if it's never needed.
Simply and clever 🙂
Quick & effective, cool. thanks.
I always use the dummy series.
Nice little trick, thanks very much!
Two sets of data better. Control is much better.
You can use the same chart next month to see what is actual and what is forecast.
To use this trick, I think grid lines has to be removed, that will make the graphic much more sharp.
to be honest, i dont understand why there is needed to do this way... in this case horizontal lines will be pale as well. then why a just can't change the color of the line partly???
Great tutorial. Thanks for the tutorial!