Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

MDX. Get data between two dates

$
0
0
I think it's very popular question. But I have not found a solution.
I have a calendar dimension with daily dynamics. In database keys have the DateTime format ("2013-09-03 03:00:00+06").
I want to get data from cube by last month, and in the database for some of the last days of the data may not yet be.
And i execute the query:
select non empty {[Calendar.Hierarhy].[2013].[10].[1] : [Calendar.Hierarhy].[2013].[10].[31]} on 0
from [Cube]

=>mondrian.olap.MondrianException: Mondrian Error:MDX object '[Calendar.Hierarhy].[2013].[10].[31]' not found in cube 'Cube'

1. How to convert specified DateTime value to calender member ("2013.10.01" => [Calendar.Hierarhy].[2013].[10].[1]) ?
2. How to say to mondrian engine don't throw exception, if you don't find calendar member, just filter this?

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>