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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Syndicate_Admin
Administrator
Administrator

¿Cómo se puede dividir el grupo od fila en algunos de los subconjuntos según la condición?

Tengo una tabla como la siguiente

Esta tabla tiene algunos artículos y columnas de cantidad y precio

lo que quiero hacer es dividir estos artículos en grupos donde la suma total del precio neto para cada grupo no exceda los 2000 $ ?

osama_ayoub_1-1674558375857.png

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Puede probar este código, pero la eficiencia es un problema

NewStep=let a=Table.AddIndexColumn(PreviousStepName,"idx"),b=List.Buffer(a[Net Value]) in Table.Group(a,"idx",{"n",each _},0,(x,y)=>Byte.From(List.Sum(List.Range(b,x,y-x+1))>=2000))

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors