thanks for the reply!
I had already tried this expression, but unfortunately I duplicate keys.
The expression in fact creates an id for each day of the month:
January 1, 2016 -> ID = 201601
January 2, 2016 -> ID = 201601
January 3, 2016 -> ID = 201601
repeated 31 times.
if I make a distinct count on the id I find 19 keys. (From January 2015 to July 2016).
if I make a normal count, I find 578 id, one for each day of the year.
I need an expression that I produce only 19 distinct keys.
I want to create a unique id, based on the union of the year and month, using the master calendar.
This is because I would like to create it based on the reference date used in the master calendar.
If you can not, simply create this field in a new table, based on the date that I use for the calendar.
The id that I create is the unique union between the year and month, in a progressive manner.
sorry if I have not explained well I hope I have explained better what I would get ...
I have used and tested your expression (when creating the master table calendar), but if I do a count on the id does not return 19 unique fields.