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!
Estoy tratando de formular en la consulta de potencia el siguiente problema:
Desde una columna llamada "Diferencia" y el día que estoy, quiero agregar una columna en la que me dice si "ejecuté" la actividad, "no ejecutada", es "planificada" es "extra ejecutada" o simplemente no hay ningún plan "No planificado".
Así que la idea es:
IF [Diferencia]-0 y no [YTDfinal]-0 y, a continuación, "Ejecutado" Si [Diferencia]<0 y DateTime.Date(Date.Time.LocalNow())>[fechainicio] y luego "Extra ejecutado" IF [Diferencia]>0 y DateTime.Date(Date.Time.Time.LocalNow())>[fechainicio] luego "Not executed" IF [Difference]>0 y DateTime.Date(Date.Time.LocalNow())<[fechainicio] y luego "Planned" IF [YTGfinal]>0 y luego "Planned" else "Unplanned".
Hice la misma fórmula en power bi desktop y estaba bien:
Ejecutadoname ? IF(AND(Cruce[Cruce[]Diferencia-0,Cruce[YTD]<>0),"Executed",IF(AND(Cruce[Diferencia]<0,TODAY()>Cruce[Date]),"Extra ejecutado",IF(AND([Diferencia]>-0,TODAY()>Cruce[Date]),"Not executed",IF(AND(Cruce[Diferencia]>0,TODAY()<-Cruce[Date]),"Planned",IF(Cruce[YTG]>0,"Planned","Unplanned")))
Pero ahora que quiero reescribir la fórmula en la consulta de potencia no funciona
Solved! Go to Solution.
Hay @carogomez
Prueba esto:
= if [Difference]=0 and [YTDfinal]<>0 then "Executed" else if [Difference]<0 and DateTime.Date(Date.Time.LocalNow())>[fechainicio] then "Extra executed" else if [Difference]>0 and DateTime.Date(Date.Time.LocalNow())>[fechainicio] then "Not executed" else if [Difference]>0 and DateTime.Date(Date.Time.LocalNow())<[fechainicio] then "Planned" else if [YTGfinal]>0 then "Planned" else "Unplanned"
No es que M es sensible a mayúsculas y minúsculas, así que si ... Entonces... otra cosa tiene que ser minúscula.
Por favor, marque la pregunta resuelta cuando haya terminado y considere dar un pulgar hacia arriba si las publicaciones son útiles.
Póngase en contacto conmigo de forma privada para obtener asistencia con cualquier necesidad de BI a gran escala, tutoría, etc.
Salud
Hay @carogomez
Prueba esto:
= if [Difference]=0 and [YTDfinal]<>0 then "Executed" else if [Difference]<0 and DateTime.Date(Date.Time.LocalNow())>[fechainicio] then "Extra executed" else if [Difference]>0 and DateTime.Date(Date.Time.LocalNow())>[fechainicio] then "Not executed" else if [Difference]>0 and DateTime.Date(Date.Time.LocalNow())<[fechainicio] then "Planned" else if [YTGfinal]>0 then "Planned" else "Unplanned"
No es que M es sensible a mayúsculas y minúsculas, así que si ... Entonces... otra cosa tiene que ser minúscula.
Por favor, marque la pregunta resuelta cuando haya terminado y considere dar un pulgar hacia arriba si las publicaciones son útiles.
Póngase en contacto conmigo de forma privada para obtener asistencia con cualquier necesidad de BI a gran escala, tutoría, etc.
Salud
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 |