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! Learn more

Reply
Anonymous
Not applicable

Need help with measure | creating dynamic measure

Hi community, 

 

Pbix file for download --> https://1drv.ms/u/s!Agarkj-fHbLWjgkn-5Cm64lDbHgU?e=wWLi3Z

 

I need help with following measure. I have  to create  categories based on how many  products consumed by ID in seletected period.  So far I create this measure but I cannot use  this measure as category.

 

Test MPU = CALCULATE( COUNT ('Table'[ID ] ) , filter( allselected('Table') ,'Table'[ID ] =max('Table'[ID ]) ))

 

My aim is count the total number  products a customer had and create category for customers had only one, two , three, etc  number of  products.  I want create following visual

 

 

Channa_0-1644958465859.png

 

I tried with columns but it is not  dynamic so I want use measure. I would really appreciate for any given help

 

Many Thanks, C.

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You might have to do dynamic segmenetation

 

measure
NrOfProducts = Count(Table[productid])

new Table
bucket = Generateseries(1,100,1)

new Measure
Countx(filter(Values(Table[ID]), [NrOfProducts] = max(bucket[Value])), [ID])

 

You have plot the this bu series values

 

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


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

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@amitchandak  Thankyou so much for your help!

amitchandak
Super User
Super User

@Anonymous , You might have to do dynamic segmenetation

 

measure
NrOfProducts = Count(Table[productid])

new Table
bucket = Generateseries(1,100,1)

new Measure
Countx(filter(Values(Table[ID]), [NrOfProducts] = max(bucket[Value])), [ID])

 

You have plot the this bu series values

 

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


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

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
Anonymous
Not applicable

Hi @amitchandak  , 

 

One last quick question, If  I have to  create dynmaic  grouping   Like "single product user" and "Multi product user "  then where to write if statement  in above code. 

 

Thanks you so much for your help!

C. 

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.