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 a todos,
Estoy intentando mover mis informes de Tableau a Power BI y tengo algunas funciones FIXED por debajo que deberían escribirse en DAX.
¿Alguien puede ayudar a convertir Tableau LOD a Power BI DAX?
Si
[Categorías]= 'CANDIES' ENTONCES
{ FIJO
[ID único],[Categorías]
:
Si
[PRECIO PROMEDIO]<450
ENTONCES 'MENOS DE 500'
ELSEIF
[PRECIO PROMEDIO]>450 AND [PRECIO PROMEDIO] =< 550
ENTONCES '$500'
ELSEIF
[PRECIO PROMEDIO]>550 AND [PRECIO PROMEDIO] =< 650
ENTONCES '$600'
ELSEIF
[PRECIO PROMEDIO]>650 LUEGO 'MÁS DE $600'
Fin
}
Fin
Cambia tu fórmula como se muestra a continuación:
Cump =
VAR a =
SWITCH (
TRUE (),
[Precio Prom] < 450, "0-$450",
AND ( [Precio Prom] > 450, [Precio Prom] <= 550 ), "$500",
AND ( [Precio Prom] > 550, [Precio Prom] <= 650 ), "$600",
[Precio Prom] >= 600, "More than $600"
)
RETURN
CALCULATE (
a,
ALLEXCEPT ( Sales, Sales[UniqueID] ),
ALLEXCEPT ( Product, Product[Categories] )
)
o tal vez:
Cump =
VAR a =
SWITCH (
TRUE (),
MAX ( DimProduct[Color] ) = "Red", "red",
AND (
MAX ( DimProduct[Color] ) = "Black",
( MAX ( DimProduct[Color] ) = "Grey" )
), "grey",
"Other color"
)
RETURN
CALCULATE ( a, ALLEXCEPT ( DimDate, DimDate[FiscalYear] ) )
Si el problema sigue sin resolverse, proporcione información detallada sobre el error y datos de prueba. Esperamos su respuesta.
Saludos
Henrio
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
@Daxmon_23 , he hecho un video en el mismo hace algún tiempo, a ver si eso puede ayudar
Hola @amitchandak , gracias por tu ayuda.
Mi intento después de verlo fue el siguiente, pero obtengo errores que parece que no puedo encontrar por qué
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 |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |