Hi ,
This is my Member Unique name for current month,
[Global Sales].[Time Period].[Time Period].[Months]->:[PC].[@MEMBER].[20161101-20161130]
my macro expression used to build this ,
#'[Global Sales].[Time Period].[Time Period].[Months]->:[PC].[@MEMBER].[' + timestampMask(_first_of_month($current_timestamp),'yyyymmdd')+ '-' + timestampMask(_last_of_month($current_timestamp),'yyyymmdd') + ']'#
This code was working fine and suddenly breaks in some days.
When debugged
#_last_of_month($current_timestamp)# this is returning
2016-11-29 22:39:37346000000
which should be 30 th and not 29th
Also I checked
#$current_timestamp#
2016-11-15 22:34:51.646000000
Now I dont know why last of month is giving 29.
I tried changing the expression little differently by putting the
_last_of_month (#$current_timestamp#)
and now it returned correct value
2016-11-30 22:41:16.297000000
not sure what makes the difference if I just have the macro for current timestamp.
If I have to use this now _last_of_month (#$current_timestamp#)
how do I substitute in my original expression
#'[Global Sales].[Time Period].[Time Period].[Months]->:[PC].[@MEMBER].[' + timestampMask(_first_of_month($current_timestamp),'yyyymmdd')+ '-' + timestampMask(_last_of_month($current_timestamp),'yyyymmdd') + ']'#
Please provide your suggestions, I am not sure why the issue is caused
Thanks,
Nithya
Has anyone has any suggestion on this
#_last_of_month($current_timestamp)# this is returning
2016-11-29 22:39:37346000000
I tried changing the expression little differently by putting the
_last_of_month (#$current_timestamp#)
and now it returned correct value
2016-11-30 22:41:16.297000000
How to use this in below expression ,
#'[Global Sales].[Time Period].[Time Period].[Months]->:[PC].[@MEMBER].[' + timestampMask(_first_of_month($current_timestamp),'yyyymmdd')+ '-' + timestampMask(_last_of_month($current_timestamp),'yyyymmdd') + ']'#
'