domingo, 15 de septiembre de 2024
Dim_Fecha =
VAR Fecha = CALENDAR(
DATE( 2023, 1, 1),
DATE( 2025, 12, 31)
) return SELECTCOLUMNS(
Fecha,
"Fecha", [Date],
"Año", YEAR( [Date] ),
"Mes", UPPER( FORMAT( [Date], "MMM" ) ),
"MesNro", INT( FORMAT( [Date], "M" ) ),
"NroDia", INT( FORMAT( [Date], "d" ) ),
"DiaSemana", WEEKDAY( [Date], 2 ),
"Semana", WEEKNUM( [Date], 2 ),
"Fin de Semana", WEEKDAY( [Date], 2 ) IN {6,7},
"Nombre Dia", UPPER( FORMAT( [Date], "DDDD" ) ),
"Nombre & Nro Dia", UPPER( FORMAT( [Date], "DDD" ) ) &"-"& INT( FORMAT( [Date], "d" )),
"TrimNro", ROUNDUP( MONTH( [Date] ) / 3, 0 ),
"Trimestre", "Q" & ROUNDUP( MONTH( [Date] ) / 3, 0 ),
"SemNro", ROUNDUP( MONTH( [Date] ) / 6, 0),
"Semestre", "S" & ROUNDUP( MONTH( [Date] ) / 6, 0),
"Desvio Dia", INT( [Date] ) - INT( Today() ),
"SortMonthYear", YEAR( [Date] ) * 100 + MONTH( [Date] ),
"M-Y" , UPPER( FORMAT( [Date], "MMM" ) ) & "-" & RIGHT(YEAR( [Date] ),2),
"SortTrimYear", YEAR( [Date] ) * 100 + ROUNDUP( MONTH( [Date] ) / 3, 0 ),
"Q-Y" , "Q" & ROUNDUP( MONTH( [Date] ) / 3, 0 ) & "-" & RIGHT(YEAR( [Date] ),2),
"SortSemYear", YEAR( [Date] ) * 100 + ROUNDUP( MONTH( [Date] ) / 6, 0),
"S-Y" , "S" & ROUNDUP( MONTH( [Date] ) / 6, 0) & "-" & RIGHT(YEAR( [Date] ),2))
Suscribirse a:
Entradas (Atom)