0

Need to create a MDX section that looks back say 36 months based off current date in relation to a date column in the cube.

Example: Admit Date is in the cube Need to check 36 months back based off current month year, instead of manually updating each month.

Here is my manual setup which I do not want to use: SELECT ( [Admit Date].[Date Month Year].&[2021]&[1] : [Admit Date].[Date Month Year].&[2023]&[7] ) ON COLUMNS

Solution have been trying but get an error stating: An empty expression was specified. If the below could be improved that is what I am trying to figure out - rollback of 36 months based off current month year:

SELECT
{strtomember([Admit Date].[Date Month Year].[” + cstr(year(dateadd(‘yyyyMM’,-36,now()))) +”]):strtomember([Admit Date].[Date Month Year].[” + cstr(yearMM(now())) +”])}
vimuth
  • 5,064
  • 33
  • 79
  • 116

0 Answers0