February 2, 2006 at 6:34 am
i am running a query like:
Select {[Measures].[Principal Amount]} ON 0,
{[LoansDisbursedDate].[All LoansDisbursedDate].[2004].[January].children,[LoansDisbursedDate].[All LoansDisbursedDate].[2004].[April].children} on 1
from loans
It gives me an error saying " cannot find dimension member " . This error is coming becouse in my fact table there is no data for "April" month.
Basically i want to retieve all the data for the specified months only. 2004 Jan month data is present in the fact table but 2004 april month data is not present so the MDX query returns an error.
So how to write MDX query in way to avoid such errors.
February 2, 2006 at 6:51 pm
You could try using the filter function with descendants function, so a similar example using foodmart is
SELECT
{[Measures].[Store Sales]} ON 0,
Filter(Descendants([Time].[All Time], 3), [Time].CurrentMember.Parent.Name = "Q1" OR [Time].CurrentMember.Parent.Name = "Q2" ) oN 1
FROM Sales
So put your month names into filter statement, and make sure that the member you're specifying as the root of the descendants in 2004 oterwise you'll get the children of all January's.
Steve.
February 3, 2006 at 2:55 am
Thanks Steve for the prompt reply . Rewriting the query using filters and Descendants functions solved my problem.
shuchi.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply