1
votes

I am bit new to mdx . Thing is we want to fetch data from olap cube between two dates.The date format is yyyy-MM-dd.So please suggest me on how to use timestamp range to filter out data.

I am using this query-

SELECT
NON EMPTY {[Measures].[Keyword count]} ON COLUMNS,
NON EMPTY {Hierarchize({[keyword].[keyword].Members})} ON ROWS
FROM [Basicsearch]
WHERE CrossJoin({[Path].[/Search]}, {[Timestamp].[${styear}].[${stmonth}].[${stday}]: [Timestamp].[${eyear}].[${emonth}].[${eday}]})  

but it is not giving any result and no error also.

please suggest me how to run this query

1

1 Answers

2
votes

Enable SQL Logging ( look at the commented out mondrian settings in log4j.xml ) and clear the cache. Then run the MDX query and look at the SQL logs to see what SQL mondrian has generated. You'll be able to tell from that why there is no data!

Could be many things - bug in the schema, genuinely no data, or problem with the parameters.