This is about decision trees in Power BI.

Let´s use this table, provided by Microsoft – for download click here.


We´d like to see which factors has impact on whether customer buys or doesn´t buy a bike.

Download the Decision tree custom visual.

Load data and put Purchased bike to Target Variable, and some variables to Input Variables. There should be variables with estimated impact on target variable.


The tree is created.

  • For example, with our variables we know, that 46% of customers buys a bike.
  • But there is big impact of number of car owned – so if the customer owns less than 1,5 cars, then the probability they will buy the bike is bigger – 54%.
  • If we only considered these from them with commute distance 5-10 miles, the probability would be 58%.
  • Etc.

The pbix file can be downloaded from here.

It´s good to know, that every visual, including decision trees, is filtered by other visuals (typically by slicers). So it is very easy to switch the trees for different sex, education, number of cars etc.

1 Comment

  1. How do you construct the excel sheet. I have tried this with my own and it never works and I’m lost as to why. Please help?

Leave a Reply

Your email address will not be published.


clear formPost comment