Forum Discussion

Lobojo's avatar
Lobojo
Helper I
4 years ago
Solved

Barchart with aggregation

Hi,

 

in Excel I was able, from a simple file with 2 levels, to create a bar chart were one of the levels were aggregated, using a Pivot table please see example below.

 

Is there any chance to do that in power BI? I was not able to reproduce it

 

 

10 Replies

  • ghoshabhijeet's avatar
    ghoshabhijeet
    Solution Supplier

    Lobojo   Thanks for sharing your query.

    In Power BI we don't have the option to show the groupings in the X-Axis like you have done in excel. However, you can achive something like this. Hope this works for you.

     

    To achieve this:

    1. You can put the Function and Action on the X-Axis and Budget on the Y-Axis

    2. Click on the highlighted button on the chart

     

    ** If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution, so that it comes in top of the search and help others. Thank you !

    Good Luck 👍

     

    • Lobojo's avatar
      Lobojo
      Helper I

      Thanks but my request was to "group" the text of "function" because in my real database the names of function and action are very long and cannot be cut. 

  • ghoshabhijeet's avatar
    ghoshabhijeet
    Solution Supplier

    Lobojo  I would then suggest you to use the Drill Down feature. You can keep the chart to the top most value in X-Axis. When the user would like to see the values under it, they may drill down and see Action values for the respective Function.

     

    Snapshot below:

    1. Initially your chart would be at the top level

    2. If the user wants to drill down, they need to select the highlighted button and drill down on their respective Function

    Hope this solution works for you.

     

     

    ** If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution, so that it comes in top of the search and help others. Thank you !

    Good Luck 👍

     

    • Lobojo's avatar
      Lobojo
      Helper I

      Thanks, but this not what I was looking for. I need a full overview, not function by function. Anyway thanks a lot for your time.

    • Lobojo's avatar
      Lobojo
      Helper I

      Thanks a lot, it worked with a stacked column graph but not with another stacked column (nothing happened). You possibly know why? They are quite the same type of visual, I don't know if there is any element that prevent the usage of this feature

      • v-easonf-msft's avatar
        v-easonf-msft
        Community Support

        Hi, Lobojo 

        This has something to do with the ordering of the fields you add on your axis.

        For example:

        Best Regards,
        Community Support Team _ Eason

    • ghoshabhijeet's avatar
      ghoshabhijeet
      Solution Supplier

      v-easonf-msft  I tried to do the same as you mentioned in your snapshot. Could you please tell me why doesn't it work with May 2022 version of Power BI desktop? Am I missing something here ?