Now i am using the following query but the response time is too slow
and for bigger report response time is huge.
I think the slow response time is due to the ABS function.
For the the next query it is good enough for the huge reports too. but
the problem is that is not genaratiung accurate results for negative
values. So is there any way possible to improve the performance of the
first query ?
Thanks in advance again.

-----------------------------------------------------------------------------------------------------------
QUERY 1
-----------------------------------------------------------------------------------------------------------
With Cell Calculation My_Cell_ON_Store_Cost For '({ [Measures].[Store
Cost]} )' As
'CalculationPassValue(Measures.CurrentMember, -1 , Relative )',
CONDITION ='
IIF([Time].currentMember.Level IS [Time].[Month] ,
CalculationPassValue( [Measures].[Store Cost], -1,Relative ) >
( ([Time].CurrentMember.PrevMember,Measures.[Store Cost]) + (Abs(
([Time].CurrentMember.PrevMember,Measures.[Store Cost]) ) * 0.02) )
, CalculationPassValue( [Measures].[Store Cost], -1,Relative ) = (
CalculationPassValue( [Measures].[Store Cost], -1,Relative ) + 1 )
)' , SOLVE_ORDER ='2000', FORE_COLOR ='11004', CALCULATION_PASS_NUMBER
='2', CALCULATION_PASS_DEPTH ='1'
SELECT {
CrossJoin({[Customers].[Country].[Canada],[Customers].[Country].[Mexico],[Customers].[Country].[USA]},{Measures.[Store
Cost]})} ON COLUMNS ,
{{[Time].[Year].[1997].[Q1].CHILDREN,[Time].[Year].[1997].[Q2].CHILDREN,[Time].[Year].[1997].[Q3].CHILDREN,
[Time].[Year].[1997].[Q4].CHILDREN,[Time].[Year].[1998].[Q1].CHILDREN,[Time].[Year].[1998].[Q2].CHILDREN,
[Time].[Year].[1998].[Q3].CHILDREN,[Time].[Year].[1998].[Q4].CHILDREN}}
ON ROWS
FROM [Sales] CELL PROPERTIES
[VALUE],[FORMATTED_VALUE],[CELL_ORDINAL],[FORE_COLOR]
-----------------------------------------------------------------------------------------------------------
QUERY 2
-----------------------------------------------------------------------------------------------------------
With Cell Calculation MY_CELL_ON_Store_Cost For '( { [Measures].[Store
Cost]} )' As 'CalculationPassValue(Measures.CurrentMember, -1 ,
Relative )', CONDITION ='
IIF([Time].currentMember.Level.Name="Month", CalculationPassValue(
[Measures].[Store Cost], -1,Relative ) >
( ([Time].CurrentMember.PrevMember,Measures.[Store Cost]) * 1.02) ,
CalculationPassValue( [Measures].[Store Cost], -1,Relative ) = (
([Time].CurrentMember.PrevMember,Measures.[Store Cost]) * 1.02) )' ,
SOLVE_ORDER ='2000', FORE_COLOR ='11008', CALCULATION_PASS_NUMBER ='2',
CALCULATION_PASS_DEPTH ='1'
SELECT {
CrossJoin({[Customers].[Country].[USA].[CA],[Customers].[Country].[USA].[OR],[Customers].[Country].[USA].[WA]},
{Measures.[Store Cost],Measures.[Store Sales]})} ON COLUMNS ,
{{[Time].[Year].[1997].[Q1].CHILDREN,[Time].[Year].[1997].[Q2].CHILDREN,[Time].[Year].[1997].[Q3].CHILDREN,
[Time].[Year].[1997].[Q4].CHILDREN,[Time].[Year].[1998].[Q1].CHILDREN,[Time].[Year].[1998].[Q2].CHILDREN,
[Time].[Year].[1998].[Q3].CHILDREN,[Time].[Year].[1998].[Q4].CHILDREN}}
ON ROWS
FROM [Sales] CELL PROPERTIES
[VALUE],[FORMATTED_VALUE],[CELL_ORDINAL],[FORE_COLOR]
-------------------------------------------------------------------------------------------------------------------------------------------