Generate months available based on fiscal calendar month.
Hi guys, I need help with a logic that satisfies my client requirements. The issue that I have is I need to generate months available in nos based on the data below. I have tried to replicate the original data as found below,
Location
Zone
Sales to Revenue Days
Mumbai
East
60
Mumbai
West
120
Delhi
East
60
Delhi
West
120
Bangalore
East
30
Bangalore
West
90
I need to generate months available against all the rows in the above table based on a fiscal month field generated in a separate table and sales to revenue days.
for eg:- if current month is April then the months available for Location = Mumbai, Zone = East, Sales to revenue days = 60 will be 10 (i.e total months are 12 based on current month so 12 - 60 days = 10 months available).
Similarly in the month of May, total months in the year will be 11 and months available will be 11 - 60 days = 9 months available.
Hope I have described my query in the simplest way possible and would appreciate your help.