Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hola a todos,
Necesito ayuda para convertir las siguientes instrucciones de caso a dax.
Caso
CUANDO ([SCODE]) = 47123
THEN((([Total Real]+1350)+Caso cuando isnull([Total Budget_Food]) luego (-1*[Presupuesto Total]) else [Total Budget_Food] END)/[Total ComparedOcc_FB]*[Max Negation])/(((Caso cuando isnull([Total Budget_Food]) luego (-1*[Total Presupuesto]) else [Total Budget_Food] END)/[Total Compared_Occ_FB])
ELSE(([Total real]+Caso cuando isnull([Total Budget_Food]) luego (-1*[Presupuesto total]) else [Total Budget_Food] END)/[Total Compared_Occ_FB]*[Max Negation])/((Caso cuando isnull([Total Budget_Food]) luego (-1*[Presupuesto total]) else [Total Budget_Food] END)/[Total Compared_Occ_FB])
Fin
Su ayuda será muy apreciada.
¿Las sugerencias anteriores ayudaron con su escenario? si ese es el caso, puede considerar Kudo o Aceptar las sugerencias útiles para ayudar a otros que enfrentaron requisitos similares.
Si esto tampoco ayuda, comparta información más detallada para ayudarnos a aclarar su escenario para probar.
Cómo obtener respuestas a su pregunta rápidamente
Saludos
Xiaoxin Sheng
@woleada20 , Puede usar Switch con True
ejemplo
Switch(True() ,
[CÓDIGO SCODE]) = 47123 , [Total real]+1350 ,
isblank([Total Budget_Food]) , -1*[Presupuesto total],
divide([Total Budget_Food] END), [Total ComparedOcc_FB]*[Max Negation])
)
De la misma manera, puede agregar otro modificador verdadero
Declaración de #PowerBI Switch-Case: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.