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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
viewSonic123
Frequent Visitor

Grouping records dynamically in matrix visual

Hi!

I'm trying to create a matrix that uses a measure that changes with a date slicer selection. Currently, I only have the matrix grouped by whatever the table calculated for the day. I want to get the matrix grouped by the date slicer selection.

 

Ex. 
These are the groups I'm trying to group under:
0-5 units

6-10 units

11+ units


These groups are the sums of the individual accounts. For example, an account can have multiple records; the sum will equal 25 units and therefore be grouped as 20-29 units. The table below shows an example of the data I'm using.

AccountUnitsCostDate
11101/1
23301/4
14701/6
12201/10
251001/15
1105001/26

 

Currently, if the user selects a slicer date of 1/11, they will get these results:

GroupAccountUnitsCost
0-5 units   
 2330
6-10 units   
11+ units   
 17100

 

But the result needs to look like this:

GroupAccountUnitsCost
0-5 units   
 2330
6-10 units   
 17100
11+ units   

 

The difference: Account 1 is grouped under 11+ units when it should be grouped under 6-10 units. The unit and cost metrics are measures that I'm using. The account is under the 'Group' row and can be drilled down on.

 

I'm thinking this is a case of grouping accounts dynamically. The problem is I don't know how that can be done. I've tried multiple solutions and can not figure it out.

 

Any help would be greatly appreciated! Thanks! 

2 REPLIES 2
amitchandak
Super User
Super User

@viewSonic123 , if unit is sum of unit or a measure then you need

 

then you need

 


Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

 

 

Else you can use a switch

a new column

= Switch(true() ,

[Unit]<5, "  0-5",

[Unit]<10, " 5-10",

// add other

"More than 10" )

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Will try these out and let you know. Thanks!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.