How to query in mdx between two dates where the date is not exist in the cube

前端 未结 1 1351
旧巷少年郎
旧巷少年郎 2021-01-28 07:02

i\'ve some problem in query the data in mdx between two dates DateFrom and DateTo. simplely the problem is, assume we have 3 records of [Year][Month][Day]:

[2012         


        
相关标签:
1条回答
  • 2021-01-28 07:45

    In general, I suggest you to keep DateTime dimensions without holes and with a older bound in the past and a far away bound in the future, so you can query without problems.

    If you cannot edit your cube definition, you may play around with FirstChild and LastChild operators in MDX to get start date and end date in you scenario (I suppose your dates are sorted).

    0 讨论(0)
提交回复
热议问题