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

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

Reply
ngocnguyen
Helper IV
Helper IV

Calculate segment

Hi

I have table 1 and wanna create the output table in power BI with below logic:

 

Calculate the No. of SO that have the "Discount/Quantity" belong to 3 segments :"  0 -2, 2-6 and >= 6"

Discount/Quantity of 1 SO  = Total discount of this SO   /  Total Quantity of this SO .

ex : Discount/Quanty of SO "A"  = (60+30)/ (10+12 ) = 4.1

 

Is there anyway to get the output without using calculated column? 

 

 

 

I have table1.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @ngocnguyen,

You can create a table with all segment types and use it with the region to create a matrix.
After these, you can write a measure with summarize function to calculate the aggregation based on 'Region' and 'SO', then you can use get the current region and segment category to filter on the variable summarize table records.

Customers Grouped by the Count of their Orders – Dynamic Segmentation in Power BI Using DAX Measures...

In addition, you can also take a look at the following blog if helps:

Dynamic segmentation – DAX Patterns

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

HI @ngocnguyen,

You can create a table with all segment types and use it with the region to create a matrix.
After these, you can write a measure with summarize function to calculate the aggregation based on 'Region' and 'SO', then you can use get the current region and segment category to filter on the variable summarize table records.

Customers Grouped by the Count of their Orders – Dynamic Segmentation in Power BI Using DAX Measures...

In addition, you can also take a look at the following blog if helps:

Dynamic segmentation – DAX Patterns

Regards,

Xiaoxin Sheng

lbendlin
Super User
Super User

Not sure what "Is there anyway to get the output without using calculated column? "  means - do you want measures, or do you want a Power Query based solution?  Please clarify.

@lbendlin 
I want to use Measure. Could you please help?

First create a list of your buckets. Then do a crossjoin with the region values, and finally compute the measure for each combination.

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.