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.

















25 Responses to “Display Alerts in Dashboards to Grab User Attention [Quick Tip]”
I prefer the red,grey,light grey,black icon set. I've also used in-cell pie charts from Fabrice's Sparklines for Excel as an alert which could also provide another piece of information.
I prefer the red,grey,light grey,black icon set. I've also used in-cell pie charts from Fabrice's Sparklines for Excel as an alert which can also provide another piece of information.
For Excel 2007, your formula should do the same as the Excel 2003 version, so that non-alert rows are blank - if they are 0, the unnecessary green icon will show
Hi Chandoo,
Nice Post !! just to add something for EXL 2003, we can also 4 Ifs and link to the alert data
For Ex: If we have alert data in Cell A2 and want to split in 4 orders namely <25%, 25-50%, 50-75% and 75%< then we can following formula and put fonts as you have suggested :
=IF(A2<0.25,CHAR(153),IF(A2<=0.5,CHAR(155),IF(A2=0.76,CHAR(152)))))
And then using Conditional Formating we can dashboard reflected on different COLOURS as per their respective alert.
Best Regards
Rohit1409
Hi Chandoo,
Nice Post !!! just to add something for EXL 2003, we can also 4 Ifs and link to the alert data
For Ex: If we have alert data in Cell A2 and want to split in 4 orders namely <25%, 25-50%, 50-75% and 75%< then we can following formula and put fonts as you have suggested :
=IF(A2<0.25,CHAR(153),IF(A2<=0.5,CHAR(155),IF(A2=0.76,CHAR(152)))))
And then using Conditional Formating we can dashboard reflected on different COLOURS as per their respective alert.
Best Regards
Rohit1409
The Complete formula [Don't Know how it got cut ]
=IF(A2<0.25,CHAR(153),IF(A2<=0.5,CHAR(155),IF(A2=0.76,CHAR(152)))))
PS : Use in single line [I have split it to avoid cuts 😉 ]
Hi Chandoo..
why it is not displaying the complete formula..
anyways here is the balance
"=IF(A2<0.25,CHAR(153), IF(A2<=0.5,CHAR(155), IF(A2=0.76,CHAR(152)))))"
@Rohit... your formulas are fine. Just that the width of comment area is fixed and hence my website is cropping it at 640pixels. I just edited your formula and added few white spaces so that it wraps nicely.
Very good idea btw.. kudos!
Hi,
Maybe just go for 'bold' ; 'underline' or 'italic' to draw the users attention? Those methods (if those can be called methods) are used cross media type (books, journals, blogs, billboards, ...) to guide the readers eye to valuable information.
Just a basic thought
@Tom.. good idea..
[...] has a very nice writeup on how to add such alerts to dashboard sheets. Possibly related posts: (automatically generated)Divide your data set into workbooksHow to enforce [...]
Hi Chandoo,
You certainly grabbed my attention! although I wasn't sure what my brother (Suresh) and cousin (Shyam) were doing right, and I was doing wrong? 😉
I love your blog btw - Many thanks for all your hard work in unravelling the secrets and mysteries of Excel!
Best regards
Ramesh
I thought I saw an advertisment for a book about learning excel called excel himalaya or something. It cost about 35.00 us money but seemed to have the things I need to have my admin assistant to start to use. I was hoping to start with this book and then send her to school if she shows some interest and aptitude. Any help on this would be appreciated. Thanks
Great web site and information!!!!
@Jeff... checkout http://chandoo.org/wp/2010/08/25/excel-everest-review/
thanks, your website is awesome!
[...] Alerts to highlight focus areas [...]
[...] There are lots of numbers in this dashboard. I would suggest adding few more visualizations like showing indicators or applying conditional formatting or replacing a table with a chart. This would reduce the [...]
[...] is the same technique as alert icons in dashboard. Just that I also showed green [...]
[...] is the same technique as alert icons in dashboard. Just that I also showed green [...]
Hi Chandoo
Firstly thanks for all the cool tips on how to use Excel better.
I am new to the site and have a question which you may be able to assist with but dont know if these comment boxes are the best way of asking ?
I am looking at assets and trying to calculate the depreciation total by taking a year (say 2010) adding the expected life of the asset (say 10 years) then comparing that to a future date (say 2015) using an IF statement. The calculation in normal is - IF((year in col B (2010) plus 10years)>year 2015, add a years depreciation, otherwise leave blank). The converted date value does not appear able to add 10 years in order to compare it to 2015. Am I missing something ?
I use the “IF” Statement in conjunction with Conditional Formatting in MS Excel to give verbiage to alert one of a required action, dependant on a review date. This makes a visual stimulus, plus it clues one as to what the conditional format is trying to warn you about and what follow-up actions are required.
Wow, I'm really impressed with dashboards. I had no idea this stuff was even possible with excel. I'd like to offer an interactive dashboard to my customers, showing analytics of their data. I have a .pdf file with the datapoints. I'd like them to enter the data on my website, and be able to see their data. Is something like that possible.
Hi Chandoo,
I've recently purchased the package for both templates.
In the portfolio dashboard,under the calculations worksheet, I'm attempting to change the date range in the gantt chart to show only the range of the project that starts in late 2013. How do I do this?
Thanks
Adam
[...] is the same technique as alert icons in dashboard. Just that I also showed green [...]
Hi Chandoo,
I'm new at Excel Dashboard and found your blog really useful and helpful! It's very nice of you that you dedicate your time to do this.
Could you please explain how can I use Alerts based on dates on a Dashboar?
For example, if a target date is coming closer to the actual date, the alert is yellow or red.
I'd really appreciate some help!
Thank you
Where can I download the file Excel of Averall Statistics ???
Thanks a lot.