Unix Technical Forum

CEL Calculation performance

This is a discussion on CEL Calculation performance within the SQL Server Data Warehousing forums, part of the Microsoft SQL Server category; --> I am using the following MDX, the Mdx works fine when there are few members but it is causing ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server Data Warehousing

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 06:44 PM
Faraz
 
Posts: n/a
Default CEL Calculation performance

I am using the following MDX, the Mdx works fine when there are few
members but it is causing performance issues with the increase of
members. Please review this MDX and comment. Is there any other
efficient way to do this or any optimization possible in this MDX?


-------------------------------------------------------------


With Member [Measures].[testmetric] AS '[Measures].[Store Sales
Net]-[Measures].[Store Sales]' --metric defination


Cell Calculation MYCALCULATION_ON_testmetric For '( {
[Measures].[testmetric]} )' As
- cell calculation name


'CalculationPassValue(Measures.CurrentMember, -1 , Relative )', --on
what should apply


CONDITION =' IIF([Time].currentMember.Level.Name="Quarter", --to see
if the level is Quarter so that it only compares quarters


IIF( ([Time].CurrentMember.PrevMember,[Measures].[testmetric]) >= 0 ,
--if for checking positve or negitive value for measure


CalculationPassValue( [Measures].[testmetric], -1,Relative ) < (
([Time].CurrentMember.PrevMember,Measures.[testmetric]) * 0.975) ,
--actual calculation for positive values


CalculationPassValue( [Measures].[testmetric], -1,Relative ) < (
([Time].CurrentMember.PrevMember,Measures.[testmetric]) * 1.025)
--actual calculation for negitive values


), --end of if for Value


CalculationPassValue( [Measures].[testmetric], -1,Relative ) = (
([Time].CurrentMember.PrevMember,Measures.[testmetric]) + 0.975) --
to always return false since I dont want other than quarters to be
evaluated


)' , --end of if for checking if level is quarter


SOLVE_ORDER ='2000', FORE_COLOR ='11004', CALCULATION_PASS_NUMBER ='2',

CALCULATION_PASS_DEPTH ='1'


SELECT { CrossJoin({[Product].[Product
Family].[Drink],[Product].[Product Family].[Food],[Product].[Product
Family].[Non-Consumable]},


{Measures.[testmetric]})} ON COLUMNS ,
{{[Time].[Year].[1997].CHILDREN}} ON ROWS


FROM [Sales for incremental update] CELL PROPERTIES
[VALUE],[FORMATTED_VALUE],[CELL_ORDINAL],[FORE_COLOR]


---------------------------------------------------------------------------*----------------------------



Thanks in advance


Faraz

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:57 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com