Hi Henrik,
In most cases with Analysis Services, the context of the "CurrentMember"
of a hierarchy is applied by default - maybe the SAS MDX implementation
is different, though?
From a cursory inspection of the calculation below, it might be useful
to refactor it as below, so that you can see how the values behave when
you drill down into [AREA}:
Member [Measures].[ValCurrent] as
[Measures].[p2SUM]/
([Measures].[p2N] - [Measures].[p2NMISS])
Member [Measures].[ValTrend] as
case
when ([Measures].[ValCurrent], [Time].PrevMember) * 0.9
Quote:
= [Measures].[ValCurrent]
THEN "Increasing"
|
when ([Measures].[ValCurrent], [Time].PrevMember) * 1.1
<= [Measures].[ValCurrent]
THEN "Decreasing"
else "+/-0"
end
- Deepak
Deepak Puri
Microsoft MVP - SQL Server
*** Sent via Developersdex http://www.developersdex.com ***