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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

undefined

Tengo una serie de pedidos, el total de unidades por cada pedido es distinta, en un pedido puede tener 3 productos o 2 productos o solo 1 productos
necesito un tabla o medida que me muestre la participacion por los totales posibles
ejemplo:

Cantidades
productos pedidos
posibles cantidad pedidos
1 78% de los pedidos
2 10 % de los pedidos
3 12 % de los pedidos

es decir que el 78% de los pedidos solo contiene un producto

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You may follow @amitchandak 's suggestion to see if it helps.

 

And I have built a data sample for test:

Eyelyn9_0-1658219971062.png

 Please follow the steps.

1. Firstly create a Number list table:

Quantities = GENERATESERIES(1,5,1)

Eyelyn9_1-1658220068413.png

2. Calculate how many products per Order:

Count = CALCULATE( DISTINCTCOUNT('Table'[Product]),ALLEXCEPT('Table','Table'[Order]))

3. Calcualte the ratio:

Ratio = 
var _t= SUMMARIZE('Table','Table'[Order],"A",[Count])
RETURN COUNTROWS(FILTER(_t,[A]=MAX('Quantities'[Value])))  / DISTINCTCOUNT('Table'[Order])

Final output:

Eyelyn9_3-1658220246125.png


Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

You may follow @amitchandak 's suggestion to see if it helps.

 

And I have built a data sample for test:

Eyelyn9_0-1658219971062.png

 Please follow the steps.

1. Firstly create a Number list table:

Quantities = GENERATESERIES(1,5,1)

Eyelyn9_1-1658220068413.png

2. Calculate how many products per Order:

Count = CALCULATE( DISTINCTCOUNT('Table'[Product]),ALLEXCEPT('Table','Table'[Order]))

3. Calcualte the ratio:

Ratio = 
var _t= SUMMARIZE('Table','Table'[Order],"A",[Count])
RETURN COUNTROWS(FILTER(_t,[A]=MAX('Quantities'[Value])))  / DISTINCTCOUNT('Table'[Order])

Final output:

Eyelyn9_3-1658220246125.png


Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Are you looking for Measure segmentation

 

Bucket/Segment code
measure
Measure = Count(Table[productid]) //

 

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

 

 

new Measure =
Countx(filter(Values(Table[user]), [Measure ] = max(bucket[Value])), [User])

 

Now you can calculate %

 

divide([new Measure ], calculate([new Measure], allselected()) )

 

refer if needed

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.