Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hola expertos,
Quiero crear una columna calculada para agrupar en función del valor de fila con condiciones:
Días de ejemplo | Condiciones Si el día ? | Columna esperada |
-9 | < -7 | 7+ Early |
-3 | -4 a -7 | 4-7 Temprano |
0 | -3 a 3 | En hora |
5 | 4 a 7 | 4-7 Tarde |
11 | > 7 | 7+ Tarde |
¿Hay una manera más sencilla de hacerlo? por ejemplo, dax de columna calculado sin crear una nueva tabla.
Gracias por su ayuda de antemano
Solved! Go to Solution.
@clubspec , Crear nueva columna como
Switch( True(),
[col] < -7," 7+ Early",
[col] <-4 , " 4-7 Early",
[col] <o 3 " On Time",
[col] <o 7 " 4-7 Late",
[col] > "7+ Late"
)
Proporcione sus comentarios y consejos para nuevos videos
Tutorial Series Dax Vs SQL Direct Query PBI Consejos
Apreciamos tus Felicitaciones.
Hola, @clubspec , es posible que desee probar esta expresión en una columna calculada
Check =
SWITCH (
TRUE (),
[Days] < -7, "7+ Early",
-7 <= [Days] && [Days] <= -4, "4-7 Early",
-3 <= [Days] && [Days] <= 3, "On Time",
4 <= [Days] && [Days] <= 7, "4-7 Late",
"7+ Late"
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hola, @clubspec , es posible que desee probar esta expresión en una columna calculada
Check =
SWITCH (
TRUE (),
[Days] < -7, "7+ Early",
-7 <= [Days] && [Days] <= -4, "4-7 Early",
-3 <= [Days] && [Days] <= 3, "On Time",
4 <= [Days] && [Days] <= 7, "4-7 Late",
"7+ Late"
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@clubspec , Crear nueva columna como
Switch( True(),
[col] < -7," 7+ Early",
[col] <-4 , " 4-7 Early",
[col] <o 3 " On Time",
[col] <o 7 " 4-7 Late",
[col] > "7+ Late"
)
Proporcione sus comentarios y consejos para nuevos videos
Tutorial Series Dax Vs SQL Direct Query PBI Consejos
Apreciamos tus Felicitaciones.