Find 5 Saturdays in a month using Date functions and not Calendar type
I am trying to create a boolean flag that will tell me if a month has 5 saturdays or not.
Can someone guide me in constructing this with date functions? Unfortunately, I cannot change my calendar settings to 4-4-5 etc because of business restrictions, so I have to calculate this manually in order to adjust and smooth our demand projections.
In Excel, we can achieve this using days in a month / 7 and then adjusting for weekday of the first day in the month, last day in the month and adding a +1/-1 accordingly to arrive at the # of saturdays in that month.
Please check if the attached screenshots are useful to you. I have used the weekday function for identifying Saturdays and changed the timescale and summary method for the cumulate line item from day to month and then created a boolean in the last line item.
I have an alternate suggestion. This could be better in terms of minimizing sparsityand is probably similar to the excel logic which you have hinted in your post. I have given below the screenshots. Please take a look at it.
Thanks Mathan - this is almost the same as the Excel formula I was using and thus easier for me to follow. I am unsure of the performance, in terms of space or time/calculations as I am new to Anaplan when I compare your solution to the others but I went ahead with the first solution as it is super straightforward for the other users to understand as well.