Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ppgandhi11
Helper V
Helper V

Grouping Help - How does the grouping work?

Hi,

 

I am trying to get the grouping working on treemap. I want the high paying services come out very distinctly.  Services is a field. So I am trying to plot the treemap for "Total Payment" measure for each of the services. However I have lot of services (100+) which are in a very small "Total Payment" range. so I see lot of small rectangles one for each of such service. Is there a way that I can create a group for services for which the "Total Payment" is less than x amount and then display this entire group as single color rectangle in the tree map?

 

Please see how it looks today without grouping. Capture.PNG

 

Thanks!

1 REPLY 1
Anonymous
Not applicable

Hey @ppgandhi11

 

I would recommend creating a calculated column like:

 

PaymentGroup =
VAR CurrentService = FIRSTNONBLANK(Table[Service],1)
RETURN
IF(
   CALCULATE(
      SUM(Table[Total Payment]),
      FILTER(
         ALL(Table),
         Table[Service] = CurrentService
      )
   ) > SOME ARBITRARY NUMBER,
   FIRSTNONBLANK(Table[Service]),
   "Small Service"
)

With this code, you can set a total payment number that every service below this number gets an identifier of "Small Service." If the service has more than this number, it gets assigned its service name. Then use this new calculated column in your tree chart.

 

Hope this helps,

Parker

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.