I am having some difficulty in utilizing the days_between function between a level (like Week) within a Time Dimension and a constant date like 2007-01-01.
When I use the following expression I get an error:
_days_between(cast([PFS HBUS Product Analysis Cube].[History Dates].[History Dates].[Week], date), 2007-01-01)
The following is the error I receive:
QE-DEF-0459 CCLException
QE-DEF-0478 Invalid coercion from 'level' to 'value' for '_days_between(cast([PFS HBUS Product Analysis Cube].[History Dates].[History Dates].[Week] as date),2007-01-01)'.
I hope that I have explained myself clearly, if not please let me know.
Thank you very much!
_days_between is a Relational function, and I'm not sure that you can perform it against a dimensional source.
What is it you are trying to accomplish? Are you actually trying to count the days between, or are you attempting to compare one period to another?