Forum Discussion

Cervelle's avatar
Cervelle
New Member
1 year ago
Solved

breakdown measure on pie chart for Power BI - data managing issue

Hello,

 

I have a set of data and I create a table like this:

Data looks like that: 

I am trying to make a pie chart.

As you can see, each column "selling obj" is independent measure.
When creating a pie chart since this columns are independent it does not breakdown by selling object, I need to add all of them as value and I cannot sort them.

 

I am looking for a way to have a breakdown by selling object so I can sort them.

 

Your help is appreciated. Thanks

  • Hey there!

     

    If I understood, you are facing an issue where each "selling obj" is a separate column, making it difficult to break down values by selling object in a pie chart.

     

    To make "Selling Object" a single category (instead of multiple columns), we need to unpivot the data.

    First open your Power Query: Select the table containing selling obj 1, selling obj 2, and selling obj 3.

    Then Highlight the columns selling obj 1, selling obj 2, and selling obj 3.
    - Click Transform → Unpivot Columns. Power BI will now create two new columns:
    "Attribute" (which stores "selling obj 1", "selling obj 2", etc.).
    "Value" (which stores the corresponding values).

     

    Next rename Columns
    - Rename "Attribute" → "Selling Object".
    - Rename "Value" → "Sales Amount".

     

    Then just create your pie chart!

    - Drag "Selling Object" into Legend.
    - Drag "Sales Amount" into Values.
    - Now, the pie chart will group sales by Selling Object.

     

    Hopefully this works for you! 😁😁

2 Replies

  • freginier's avatar
    freginier
    Icon for Solution Sage rankSolution Sage

    Hey there!

     

    If I understood, you are facing an issue where each "selling obj" is a separate column, making it difficult to break down values by selling object in a pie chart.

     

    To make "Selling Object" a single category (instead of multiple columns), we need to unpivot the data.

    First open your Power Query: Select the table containing selling obj 1, selling obj 2, and selling obj 3.

    Then Highlight the columns selling obj 1, selling obj 2, and selling obj 3.
    - Click Transform → Unpivot Columns. Power BI will now create two new columns:
    "Attribute" (which stores "selling obj 1", "selling obj 2", etc.).
    "Value" (which stores the corresponding values).

     

    Next rename Columns
    - Rename "Attribute" → "Selling Object".
    - Rename "Value" → "Sales Amount".

     

    Then just create your pie chart!

    - Drag "Selling Object" into Legend.
    - Drag "Sales Amount" into Values.
    - Now, the pie chart will group sales by Selling Object.

     

    Hopefully this works for you! 😁😁

  • hi there,

     

    It seems to be exacty what I need.

    I think now I can sort it out on a larger amnount of data.

     

    merci freginier !