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 semantic model 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.

Screenshot shows the completed decomposition tree.

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 Fabric 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

  1. Open the Power BI service (app.powerbi.com), and select Learn in the left navigation.

  2. On the Learning center page, under Sample reports, scroll until you see the Retail Analysis Sample.

    Screenshot shows the Power BI Learning center where you can import samples.

  3. Select the sample. It opens in Reading mode.

  4. Power BI imports the built-in sample, adding a new dashboard, report, and semantic model to your current workspace.

Create a report from the semantic model

On the Semantic models + dataflows tab, you have several options for exploring your semantic model. In this tutorial, you're going to explore the semantic model by creating your own report from scratch.

Screenshot shows the Retail Analysis Sample semantic model entry.

  1. Select More options (...) > Create report.

    Screenshot shows the Create report menu item.

    The semantic model opens in report editing mode.

    Screenshot shows a brand-new report in edit mode.

Create a decomp tree

Let's add a decomposition tree, or decomp tree, to our report for ad hoc analysis.

  1. Open Power BI Desktop and load the Retail Analysis Sample. You can get this sample from Download original sample Power BI files.

  2. Select the Report icon to open the Reports view. In the Visualizations pane, select the Decomposition tree icon.

    Screenshot shows the Visualizations pane with Decomposition tree selected.

  3. Drag the edge so it fills most of the page. Decomposition trees can get wide.

    Screenshot shows the resized decomposition tree.

  4. 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.

    Screenshot shows Value for This Year Sales added to the Analyze box for the decomposition tree.

  5. 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
    • Category
    • FamilyName
    • Segment
    • Chain
    • PostalCode
    • Store Type
    • Territory

    Screenshot shows the fields added to the Explain by box.

Analyze in the decomp tree

Now comes the ad hoc analysis part.

  1. 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.

    Screenshot shows High value selected for analysis.

    Power BI selects Store type.

    Screenshot shows Store Type selected by Power BI.

  2. Keep selecting High value until you have a decomp tree that looks like this one.

    Screenshot shows all the highest values selected by Power BI.

    Or select other values yourself, and see what you end up with.

  3. You can delete levels by selecting the X in the heading.

    Screenshot showing how to delete a level from the decomposition tree.

  4. 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.

    Screenshot shows the decomposition tree with the options available for This Year Sales.

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