March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.