Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hola equipo,
cómo obtener el número de índice como este en la columna calculada usando DAX.
No necesito la solución Power Query, RANKX también.
El orden de la alta costura debería cambiar
País | Índice |
Canadá | 1 |
Francia | 2 |
Alemania | 3 |
Estados Unidos | 4 |
Bermudas | 5 |
Puede crear una tabla calculada.
DAX Indexed Table =
VAR __SourceTable = 'Table'
VAR __Count = COUNTROWS(__SourceTable)
VAR __SortText = CONCATENATEX(__SourceTable,[Country],"|")
VAR __Table =
ADDCOLUMNS(
GENERATESERIES(1,__Count,1),
"Country",PATHITEM(__SortText,[Value],TEXT)
)
RETURN
__Table
Referencia:
El mítico índice DAX - Comunidad de Microsoft Power BI
Saludos
Esteban Tao
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.