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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
claireamc
New Member

Dynamic Grouping as a Measure

I'm trying to group a column of data (room capacities) through a measure into dynamic banded groups, eg 0-9, 10-19, 20-19 etc using a DAX measures and a capacity reference table, but I just can't seem to get the measure that will find the right results.

 

I'm not seeing the right results and would like to check why this is:

 

First, I'm attempting to represent the column of data as a measure, eg.

2m = SumX('Available Space', 'Available Space'[Final Capacity Estimate 2m]*1)
 
Is this correct?
 
Secondly I have created a reference table of capacity groups as follows:
 
 
CapacityMinMax
0-909
10-191019
20-292029

 

Lastly, I've tried to find a way to created a DAX formula which will allow the first measure to be searched for the number of instances where a piece of data falls between the mins and maxes in the table as so:

Capacity Band 2m = CALCULATE ([2m],
FILTER(VALUES('Available Space'[Final Capacity Estimate 2m]) ,
COUNTROWS(FILTER('Capacity Bands', 'Available Space'[Final Capacity Estimate 2m] >= 'Capacity Bands'[Min] && 'Available Space'[Final Capacity Estimate 2m] < 'Capacity Bands'[Max]))))
 
This doesn't appear to be returning the correct data, and I'm not sure which calculation this is due to. Has anyone ever grouped through a measure like this before?
Some advice or an alternative answer would be extremely helpful.
1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @claireamc 

 

Try this article.

https://www.daxpatterns.com/dynamic-segmentation/

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.