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
¿Alguien puede ayudar con esta fórmula en Power BI DAX, por favor?
El resultado que necesito es en porcentaje.
Gracias
Pruebe una fórmula como la siguiente:
M =
VAR cur =
MONTH ( MAX ( test[Date] ) )
VAR pre1 =
MONTH ( EOMONTH ( MAX ( test[Date] ), 0 ) )
VAR pre2 =
MONTH ( EOMONTH ( MAX ( test[Date] ), -2 ) )
VAR nex1 =
MONTH ( EOMONTH ( MAX ( test[Date] ), -3 ) )
VAR nex2 =
MONTH ( EOMONTH ( MAX ( test[Date] ), -5 ) )
VAR per =
CALCULATE (
SUM ( test[Order Qty] ),
FILTER ( ALL ( test ), cur <= pre1 && cur >= pre2 )
)
VAR nex =
CALCULATE (
SUM ( test[Order Qty] ),
FILTER ( ALL ( test ), cur <= nex1 && cur >= nex2 )
)
RETURN
DIVIDE ( per, nex )
Si el problema aún no se resuelve, proporcione información detallada sobre el error y hágamelo saber de inmediato. 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.
Estos serán los mismos datos, por ejemplo,
Tabla con nombre - Prueba
DAX depende en gran medida del contexto / escenario, obtendrá su solución más rápido si pudiera proporcionar algunos datos de muestra.
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 | |
2 | |
2 | |
2 | |
1 |