0
votes

My goal is to create a monthly employment data series given that each record has the following fields: year, quarter, and 3 monthly fields of the actual data (month 1 employment, month 2 employment, and month 3 employment). I have to associate each month of data to an actual month (e.g., month 2 of quarter 3 in 2018 as employment for August 2018). Each record represents a firm. A firm will have records associated with each month. So, looking for total employment. There are multiple quarters and multiple years. Would I have to restructure the data or create a calculation? Any suggestions?

1

1 Answers

0
votes

This can be done using 'calculated field' easily. Assuming your three fields are year, quarter and month respectively, you can create my_month as follows.

sample data input

year, quarter, month
2018, 1, 1
2018, 2, 1
2019, 4, 3

calculated field my_date as

MAKEDATE([Year], ([Quarter]-1)*3+[Month], 1)

Output

Thereafter add calculated field Total_emp_each_month as

{
Fixed [my_date] : sum([employment])
}