Tengo una columna con valores de Non-Covid y Covid. Si el valor es Covid, el año fiscal debe formatearse y rellenarse en función de la columna Inicio programado. Si el valor es No-Covid, el año fiscal debe formatearse y rellenarse en función de la columna Fecha notificada. Mi fórmula es
Solved! Go to Solution.
Si se trata de una columna calculada en una tabla, intente:
Fiscal Month/Yr = IF(
'2700 WO Listing'[Covid vs Non-Covid (groups)]="Non-Covid",
FORMAT('2700 WO Listing'[Reported Date],"MMM-yyyy"),
FORMAT('2700 WO Listing'[Scheduled Start],"MMM-yyyy")
)
Si está utilizando esto en una medida, intente:
Fiscal Month/Yr = IF(
MAX( '2700 WO Listing'[Covid vs Non-Covid (groups)]) = "Non-Covid",
FORMAT('2700 WO Listing'[Reported Date],"MMM-yyyy"),
FORMAT('2700 WO Listing'[Scheduled Start],"MMM-yyyy")
)
@ahhollan esta sintaxis debe funcionar para la columna calculada:
pero no funcionaría para una medida.
perdió algunos paréntesis, fórmulas y comillas. Prueba esto:
Fiscal Month/Yr =
IF (
'2700 WO Listing'[Covid vs Non-Covid (groups)] = "Non-Covid",
FORMAT ( '2700 WO Listing'[Reported Date], "MMM-yyyy" ),
FORMAT ( '2700 WO Listing'[Scheduled Start], "MMM-yyyy" )
)
Orgulloso de ser un SuperUsuario. Si ayudé, por favor acepte la solución y dar felicitaciones! |
Si se trata de una columna calculada en una tabla, intente:
Fiscal Month/Yr = IF(
'2700 WO Listing'[Covid vs Non-Covid (groups)]="Non-Covid",
FORMAT('2700 WO Listing'[Reported Date],"MMM-yyyy"),
FORMAT('2700 WO Listing'[Scheduled Start],"MMM-yyyy")
)
Si está utilizando esto en una medida, intente:
Fiscal Month/Yr = IF(
MAX( '2700 WO Listing'[Covid vs Non-Covid (groups)]) = "Non-Covid",
FORMAT('2700 WO Listing'[Reported Date],"MMM-yyyy"),
FORMAT('2700 WO Listing'[Scheduled Start],"MMM-yyyy")
)