pie chart with the legend in two columns_10132023.pbix

Goal

Make “Share” and “Bond” field as legend in a pie chart

Solution

  1. Create a new table with “Structure” field and set “Shares” and “Bond” as row

    Structure
    Shares
    Bond
  2. Add a new column “Total Value” to calculate the total value

    Total Value = 
    SWITCH(TRUE(),
    'Structure Legend'[Stucture] = "Shares", CALCULATE( SUMX('funds structure', [shares]*[Value])),
    'Structure Legend'[Stucture] = "Bonds", CALCULATE( SUMX('funds structure', [bonds]*[Value])))
    
  3. Put the “Structure” and “Total Value” into the pie chart

    Untitled