powerbidaxdata-modeling

Power BI - Tree chart out of only numerical data


In my data model I have a table with data that approximately looks like this:

ID Cash_All_Accounts Cash_Current_Accounts Cash_Saving_Accounts Cash_Long_Term_Saving_Accounts Cash_Short_Term_Saving_Accounts
1 100 50 50 25 25
2 200 50 150 100 50

The columns 'Cash_Current_Accounts' and 'Cash_Saving_Accounts' are subsets of the 'Cash_All_Accounts' column. Additionally, the columns 'Cash_Long_Term_Saving_Accounts' and 'Cash_Short_Term_Saving_Accounts' are subsets of the 'Cash_Saving_Accounts' column.

So in other words these two equations are always true:

  1. Cash_All_Accounts = Cash_Current_Accounts + Cash_Saving_Accounts
  2. Cash_Saving_Accounts = Cash_Long_Term_Saving_Accounts + Cash_Short_Term_Saving_Accounts

I want to create a tree chart in power bi that will looks like this:

enter image description here

Is it possible to get something like this using built-in power bi tree chart or some custom chart?


Solution

  • You should be able to use the decomposition tree. First you have to normalise your data, so your input table could like like for example:

    ID | Current | Savings  | Amount
    ---|---------|----------|-------
     1 | Cash    |          | 50
     1 | Savings | Long  t  | 25
     1 | Savings | Short t  | 25
    

    and next just set up the decomposition tree visual:

    enter image description here

    This article has more info about this particular visual.