Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hola chicos,
Estoy luchando por definir esta declaración DAX,
básicamente tengo una tabla donde hay ID_SELLER, VENDEDOR DE NOMBRE, NUM MES y quiero insertar GOAL VALUE de manera diferente a través de los meses para cada vendedor
Por ejemplo, si ID_SELLER 300 && MES NUM - 1, VALOR DE OBJETIVO - 120000
'' NUM DE MES 2, VALOR DE LA META A 130000
más adelante
301 MES NUMERO 1.... VALOR 50000
2
Intenté usar SWITCH(IF(ID_SELLER á 300 && MONTH NUM á 1, TRUE()), TRUE(), 120000)
pero no sabía cómo seguir insertando otros meses ya que DAX no me permite establecer valores en condiciones variables. Creo que esto resultaría en una declaración de muchas líneas, ¿alguien tiene una solución simillar o puede ayudar con algo?
Muchas gracias
Solved! Go to Solution.
@thatjoey20 , Crear una nueva columna como
VALOR DE OBJETIVO - Interruptor( True(),
[ID_SELLER] a 300 && [MES NUM] a 1, 120000,
[ID_SELLER] a 300 && [MES NUM] a 2,130000
añadir otros
)
Hola @thatjoey20 ,
Prueba esta medida
GOAL TO REACH =
IF (
Goals[Seller ID] = 300
&& Goals[Month #] = 1,
12000,
IF (
Goals[Seller ID] = 300
&& Goals[Month #] = 2,
13000,
IF ( Goals[Seller ID] = 301 && Goals[Month #] = 1, 50000 )
)
)
Avísame si tienes alguna pregunta.
Si esto resuelve sus problemas, márquelo como la solución, para que otros puedan encontrarlo fácilmente. Kudos 👍son agradables también.
Nathaniel
Proud to be a Super User!
@thatjoey20 , Crear una nueva columna como
VALOR DE OBJETIVO - Interruptor( True(),
[ID_SELLER] a 300 && [MES NUM] a 1, 120000,
[ID_SELLER] a 300 && [MES NUM] a 2,130000
añadir otros
)
¡¡Funcionó!! ¡Muchas gracias! Sólo necesitaba poner true como una condición de expresión !
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |