Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hola, tengo una pequeña pregunta. Tengo una columna X con 1 2 3 4 5 6 como números y quiero que se agregue una columna con Y como igual que X, pero la 1ª fila debe omitirse en Y cuando se compara con X. Como el siguiente.
X Y
1
2 1
3 2
4 3
5 4
6 5
6
c
¿Alguien puede sugerirme la solución con un código DAX o cualquier otra cosa?
Pruebe lo siguiente:
Table2 = DISTINCT(UNION( SELECTCOLUMNS('Table',"X",'Table'[X]),SELECTCOLUMNS('Table',"X",0)))
Y = IF (
Table2[X]=0,
CALCULATE(MAX(Table2[X]),ALL(Table2)),
IF (
CALCULATE (
MAX ( 'Table2'[x] ),
FILTER ( ALL ( Table2 ), Table2[x] < EARLIER ( Table2[X] ) )
) = 0,
BLANK (),
CALCULATE (
MAX ( 'Table2'[x] ),
FILTER ( ALL ( Table2 ), Table2[x] < EARLIER ( Table2[X] ) )
)
)
)
¿Respondí a su pregunta? ¡Marca mi post como solución!
Saludos
Lucien
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.