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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Oye
¿Podría alguien por favor ayudarme con el siguiente problema, por favor?
| Mesa | ||
| Categoría | Producto | Valor |
| Fruta | manzana | 9 |
| Fruta | Plátano | 8 |
| Fruta | Naranja | 7 |
| Ensalada | Lechuga | 4 |
| Ensalada | Tomate | 1 |
| Salida deseada | ||
| NUEVO producto | Valor | rango |
| manzana | 9 | 1 |
| Plátano | 8 | 2 |
| Naranja | 7 | 3 |
| Lechuga | 4 | 1 |
| Tomate | 1 | 2 |
| Fruta | 24 | 1 |
| Ensalada | 5 | 1 |
Hola @lauren1192 ,
Una pequeña modificación a la fórmula por @AllisonKennedy
New Table =
UNION (
SUMMARIZECOLUMNS (
'Table'[Product],
"Value", SUM ( 'Table'[Value] ),
"Rank", IF (
MAX ( 'Table'[Product] )
<> BLANK (),
RANKX (
FILTER (
ALL ( 'Table' ),
'Table'[Category]
= MAX ( 'Table'[Category] )
),
CALCULATE (
SUM ( 'Table'[Value] )
)
)
)
),
SUMMARIZECOLUMNS (
'Table'[Category],
"Value", SUM ( 'Table'[Value] ),
"Rank", IF (
MAX ( 'Table'[Product] )
<> BLANK (),
RANKX (
ALL ( 'Table'[Category] ),
CALCULATE (
SUM ( 'Table'[Value] )
)
)
)
)
)
saludos
Harsh Nathani
Apreciar con un Kudos!! (Haga clic en el botón Pulgares arriba)
¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!