Tutorial: Create a decomposition tree with a Power BI sample
APPLIES TO: Power BI Desktop Power BI service
In this tutorial, you start with a built-in Power BI sample dataset and create a report with a decomposition tree. A decomposition tree is an interactive visual for ad hoc exploration and conducting root cause analysis. It's also an artificial intelligence (AI) visualization. You can ask it to find the next category, or dimension, to drill down into based on certain criteria. For more information, see Create and view decomposition tree visuals in Power BI.
This tutorial shows you how to:
- Sign up for a Power BI license, if you don't have one.
- Import the Retail Analysis sample and add it to the Power BI service.
- Create a decomposition tree.
- Do root cause analysis on your data in the decomposition tree in Edit mode.
- Save the report and continue root cause analysis in reading view.
If you want to familiarize yourself with the built-in sample in this tutorial and its scenario, see Retail Analysis sample for Power BI: Take a tour before you begin.
You don't need a Power BI license to explore the samples in Power BI Desktop. You just need a Power BI free license to explore the sample in the Power BI service, and save it to your My workspace.
To open a Power BI .pbix file, you need to get Power BI Desktop. It's a free download.
Import the sample in the Power BI service
Open the Power BI service (
app.powerbi.com), and select Learn in the left navigation.
On the Learning center page, under Sample reports, scroll until you see the Retail Analysis Sample.
Select the sample. It opens in Reading mode.
Power BI imports the built-in sample, adding a new dashboard, report, and dataset to your current workspace.
Create a report from the dataset
On the Datasets + dataflows tab, you have several options for exploring your dataset. In this tutorial, you're going to explore the dataset by creating your own report from scratch.
Create a decomp tree
Let's add a decomposition tree, or decomp tree, to our report for ad hoc analysis.
Open Power BI Desktop and load the Retail Analysis Sample. You can get this sample from Download original sample Power BI files.
Select the Report icon to open the Reports view. In the Visualizations pane, select the Decomposition tree icon.
Drag the edge so it fills most of the page. Decomposition trees can get wide.
Decomp trees analyze one value by many categories, or dimensions. Expand Sales > This Year Sales and select Value. Power BI adds Value to the Analyze box.
Next, select dimension fields and add them to the Explain by box. Add as many as you want, in any order. You can use them or not, in any order, in the decomp tree. We added:
- District Manager
- Store Type
Analyze in the decomp tree
Now comes the ad hoc analysis part.
Select the plus sign (+) next to This Year Sales and select High value. That means Power BI uses artificial intelligence to analyze all the different categories in the Explain by box, and pick the one to drill into to get the highest value of the measure being analyzed.
Power BI selects Store type.
Keep selecting High value until you have a decomp tree that looks like this one.
Or select other values yourself, and see what you end up with.
You can delete levels by selecting the X in the heading.
Save your report. Now anyone who views your report can interact with the decomp tree, starting from the first This Year Sales and choosing their own path to follow.
Learn about everything else you can do with decomp trees in Create and view decomposition tree visuals in Power BI.
More questions? Try the Power BI Community
Submit and view feedback for