How do I create a Date Field if i have Data for Month and Year .
I have created a date filed like below:-
Date#(years & '-' & months, 'YYYY-MMM') as Date_Test, but I have to generate fiscal calendar based on this date field.
I tried to link this date field to my master calendar, but for Fyear, Fmonth I am getting blank values.
Script for master cal:
Set vFM = 4 ; // First month of fiscal year
Load Dual(fYear-1 &'/'& fYear, fYear) as FYear, // Dual fiscal year
Dual(Month, fMonth) as FMonth, // Dual fiscal month
Load Year + If(Month>=$(vFM), 1, 0) as fYear, // Numeric fiscal year
Mod(Month-$(vFM), 12)+1 as fMonth, // Numeric fiscal month
Load Year(Date_Test) as Year, // Your standard master calendar
Month(Date_Test) as Month,
num(Month(Date_Test)) as monthno,
Date(Monthstart(Date_Test), 'YYYY-MMM') as MonthYear,