Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello. I have build my calender. I have set a line with an indicator end of the month. End of the month is green.This works
Also i have set a line with an Indicatorbegin of the month, the red line, this isn't working. Can anyone help me to get this working?
Datum_TEMP:
LOAD
Date($(vMinDatumNum)-1 + recno()) as d
Autogenerate $(vMaxDatumNum) - $(vMinDatumNum) + 1;
Kalender:
LOAD
*,
If(IndicatorEindeMaand = 1,'Ja','Nee') as RapportageEindeMaand,
If(IndicatorBeginMaand = 0,'Ja','Nee') as RapportageBeginMaand
;
LOAD
1 as #Kalenderdag,
Num(d) as _Datum.KEY,
d as Datum,
Capitalize(Month(d)) as Maand,
'Q'&(Ceil(Month(d) / 3)) as Kwartaal,
Year(d) as Jaar,
Year(d)& Capitalize(Month(d)) as JaarMaand,
Year(d)& Week(d) as JaarWeek,
Day(d) as Dag,
Week(d) as Week,
WeekDay(d) as Weekdag,
If(Weekday(d)='za' or Weekday(d)='zo', 0,1) as Werkdag,
If(d = Floor(MonthEnd(Makedate(Year(d),Month(d)))),1,0) as IndicatorEindeMaand,
If(d = Floor(MonthStart(Makedate(Year(d),Month(d)))),0,1) as IndicatorBeginMaand
Resident Datum_TEMP;
Drop table Datum_TEMP;
Thank you
It seems to be working fine here, RapportageBeginMaand has the value 'Ja' for each first day of the month.
I don't know why you set the IndicatorBeginMaand to 0 for the beginning of the month. You could switch to:
If(d = Floor(MonthStart(Makedate(Year(d),Month(d)))),1,0) as IndicatorBeginMaand
Makes it a bit easier to follow. Then of course you need to switch the other part as well:
If(IndicatorBeginMaand = 1,'Ja','Nee') as RapportageBeginMaand