Forum Discussion
Treemap - dynamic grouping question.
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).
This is the sample data i am working on,I have created a column "Color" using DAX query "Color = if(Table1[Column1]>90,"GREEN","RED")" .
After that for the treemap visualisation,I have added these as columns
Then you can use the first tree map as the slicer to the second one according to your data.I hope this helps ! You are most welcome for any other query !
- ppgandhi118 years ago
Helper V
Thanks. It looks like I need more help. I am able to add the column color and assign it the values Green and Red using the DAX formula you have suggested.
When I try to create a upper level treemap, when i click on column1 and color, for some reason the color goes directly into tooltip instead of details in the visualization. i am not able to drag it to put it on the details how you are showing. do you know why would that happen?
this is how my visualization comes out.
In my case, the 15D TAT % is a measure (equivalent to your column1 field). It is calculated based on the formula:
15D TAT (%) = CALCULATE(SUM(BaseQuery[Claims Processed with 15D TAT])/count(BaseQuery[ClaimSystemKey])*100)
Is there a way you can share your file with me to see what am i missing?
- ppgandhi118 years ago
Helper V
I tried creating a sample data that you have showed and it worked the way you have demonstrated. Unfortunately my case does not seem to be the same. Since the column1 that you have shown is a measure in my case, it is dependent on a qualifer (payor in this case) so as soon as i select it, i get to level2 of treemap directly since now the colors are shown based on payor.
I am very new to power bi so guessing at this time, but if the column1 would have been a calculated measure based on other fields, then would you still expect the same behavior that you have demonstrated? if so, then I am missing something. Hope we have a capability to share the pbix to show the issues. Thanks.
- Hardik8 years ago
Continued Contributor
hey i
created a measure average and the treemap works fine on this side.
Measure = AVERAGE(Table1[Column1])