Hello, I have a calendar with only months and days, but I need February to always generate 29 days, can I do it?
LET vMesActualAñoAnterior = MonthStart(Fecha,-12); // format dd/mm/yyyy
LET vMesActulaAñoAnteriormasTres = MonthEnd(Fecha,-10); //
LET vini = num(vMesActualAñoAnterior,'0');
LET vfin = num(vMesActulaAñoAnteriormasTres,'0');
Date(IterNo()+$(vini)-1,'DD/MM') as Fecha_dm
AutoGenerate 1 While IterNo()+$(vini)-1<=$(vfin);
Day(Fecha_dm)&'/'&month(Fecha_dm) as Fecha_dm,
Day(Fecha_dm) as Dia,
Month(Fecha_dm) as Mes
drop table CalendarioMaestro_trb;
I'm not sure that this would be a good idea. The calendar-days are different between the month and also between the (leap) years and weeks are overlapping between the months ... This means they couldn't be compared 1:1 else there will be always certain gaps and/or some blurring. Each attempt to force a comparison with artificial dimension-values creates rather more differences and confusing as it would be helpful.
Possible alternatives may be not to compare the calendar-day else the working-day or to apply a 4-4-5 or similar calendar or to use appropriate averages like sales per working-day on a week/month level or something similar.
No, this wasn't meant. Of course you may move/merge the values but this changes the data in a way which couldn't improve the analysis.
Personally I wouldn't do any adjusting of the dates and their values else if the data are analysed on a daily level I would display that there is nothing to compare on 29 Feb. and ignoring it because that's not wrong else it is as data are like and on a monthly level I would use the average per working-day.