Power BI

Harnessing machine learning to increase customer retention

By September 2, 2022 October 11th, 2022 No Comments
Person holding out hand with digital charts

Power BI is an excellent tool for creating dashboards and reports. The Power BI platform consists of the Power BI Desktop, Power BI Paginated Report Builder, and the Online Service. When the Power BI Desktop is powered by Azure Cloud Storage, it can leverage Azure Machine Learning (ML) technology to create powerful and advanced analyses. In this blog we will discuss one of the many scenarios in which we can leverage Artificial Intelligence to predict a customer’s churn, based on a case study.

In this case, we’ll look at a fictional online clothing retailer. This retailer’s clients are mostly returning customers. The retailer’s prices are enticing, and their customer service is highly rated. But as is the case with so many companies, even their return customers eventually fade away. The CEO and the marketing department would like to know why. If price and customer experience aren’t an issue…why the churn?

They know if they can answer this one simple question, they will be able to address any pertinent issues, and increase customer retention. Our fictional company has data in the form of surveys, sent randomly to customers who have made purchases in the past. These surveys pose questions about the purchasing experience, online store design, and more. Additional retail and sales data is stored in SQL databases. And, cleverly, our company has also collected open source social and demographic data. (This kind of data can be outsourced or generated through experiments.)

Our company has a solid base of information, but we need to generate some kind of reliable logic for them that identifies a churn customer – for example, a customer that purchased at least one item, 30 days prior, and has not purchased any items within the last 30 days. We can then apply that logic on historical data and create a column in our dataset. So, we have a question to answer, and we have data. It’s a good start. But now we need to get a full understanding of that data. For this, we’ll use exploratory data analysis using univariate, bivariate and multivariate plots.

Plotting helps us understand the distribution of data, find and mitigate missing values, and clean the data. Machine learning requires the input data to be numeric in most cases, so depending on the data, we will convert text into numerical values using ordinal or nominal techniques. At this point, the data will be ready for statistical analysis. Statistical analysis will help us determine the significance of all the predictors to the new churn label. We’ll use other mechanical techniques such as variance inflation indicators and correlation matrix to choose the best predictors of customer churn.

Depending on the data size we can either use data bricks, Azure Synapse, or Azure ML with a data lake to clean, prepare, and train ML models.

In this case, the data is not very large so we will use Azure ML studio to treat the data and train the machine learning model.

Machine Learning evaluation model
Machine Learning evaluation model

Azure Data Studio is a powerful tool that allows data scientists to train models and evaluate their accuracy. It has many machine learning models to choose from, but some machine learning algorithms perform better than others, and we want to choose the best.

Machine learning graphs

Now, that we’ve trained our model, and we’re happy with its performance, we can use ML studio to create a web API end point. This API will have input columns and output columns, and will include the “Predicted” label on the new data, this time listing the probability of the prediction.

Machine Learning predictors

Handily, we can now call up the machine learning model in Power BI using Power Query Azure ML. Because we are already signed in using our credentials, we will be able to see the Machine Learning Model. We can pass it the columns as input, and it will create the predicted churn label and its probability. Even better, we can now use advanced analysis in a Power BI dashboard. And, with the help of these incredibly powerful tools, we can generate solid answers to what factors (based on our input columns) might weigh more heavily on customer churn than others.

Azure Machine Learning

Marketing departments can use these reports to predict customers at risk of churning. They can identify who they are, and why they might churn. And they can create custom offers for these customers, to reduce churn and increase retention.

These kinds of advanced data analysis tools can foster real-world solutions to old style problems. How do we keep our customers happy? And keep them coming back? Power BI is one such tool that can create powerful results.

Jaouad Safouani

Author Jaouad Safouani

More posts by Jaouad Safouani