Forum Discussion

ppgandhi11's avatar
ppgandhi11
Helper V
8 years ago

Treemap - dynamic grouping question.

Hi,

 

I have a treemap that has supplies category, each colored either green (if the sales for that supplies category is above 90%), or red (if the sales is below 90%). So, my treemap has bunch of greens and red squares.

 

What I want is an upper level view. Just 2 boxes red and green. When User clicks on red box, it will drill through and show the treemap of all the supplies category having sales >= 90% and when the user clicks on green box, it will drill through and show the treemap of all the supplies category having sales < 90%.

 

How would I go about it? The data being dynamic, it may be possible that all supplies category may fall into green or in red! I need a good headstart on how to go about creating upper level treemap. Any help is greatly appreciated. Thanks.

 

Prashant-

16 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    Hi ppgandhi11

     

    You can add a calculated column to your table that dynamically determines if the value should be red or green.

     

    This will only be dynamic based on data coming into the model and filters will not have any effect.

  • Hardik's avatar
    Hardik
    Continued Contributor

    You can form two tree maps one acting as a slicer and the other reflecting changes and form groups by selecting the data and forming a calculated column to filter the records as green and red.

    • ppgandhi11's avatar
      ppgandhi11
      Helper V

      Hardik,

       

      This is exactly what I am trying to do. I have a detailed treemap that you have shown. I want an upper level treemap done. How to achieve this?

       Please see the attached screenshot which shows the supplies categories marked in red and green. What I want is another treemap (which is upper level) which shows only red and green section which can be drilled down to get to the level that I have shown above. Does it call for grouping? You have demonstrated the outcome, I want to know how to achieve this. Sorry, I am very new to Power BI so detailed instructions will really help me a lot. Thanks.

       

      Please note that everytime I fetch data from SQL Server DB, there may not be both green and red at upper level. if all the supplies category fall in 90% or above then the only square I will find would be green (red will be missing due to no supplies category falling in red zone).

       

      • ppgandhi11's avatar
        ppgandhi11
        Helper V

        Also, how to find out the number of green boxes and red boxes in the 2nd level treemap that I have? In the example I have shown previously, there are 6 green boxes and 5 red boxes. Is there a way to numerically demonstrate them?