dbTalk Databases Forums  

Urgent Cell Calculation

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Urgent Cell Calculation in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mansoorak77@gmail.com
 
Posts: n/a

Default Urgent Cell Calculation - 07-15-2005 , 07:22 AM






I am using following MDX query to highlight only those values which are
1% greater than its respective previous value. Only problem i am facing
is that whenever i apply this formula on any calculated Measure which
is using any aggregation formula like SUM, AVG, e.t.c., it won't work.

Any suggestion to modify this Query so it can also handle Calculated
Measures using Aggregation formulas???



With Cell Calculation INDICATOR For '( { [Measures].[Previous Year
Sales Value %]} )' As
'CalculationPassValue(Measures.CurrentMember, -1 , Relative )',
CONDITION =' CalculationPassValue( [Measures].[Previous Year Sales
Value %], -1,Relative ) >
( ([Time].CurrentMember.PrevMember,Measures.[Previous Year Sales Value
%]) * 1.01)' ,
FORMAT_STRING ='##,##.##; (##,##.##) ; \Z\e\r\o', FORE_COLOR ='11004',
CALCULATION_PASS_NUMBER ='2', CALCULATION_PASS_DEPTH ='1'

SELECT {[Measures].[Previous Year Sales Value %]} ON COLUMNS,
{{[Time].[Year].members}} ON ROWS
FROM [Sales]
CELL PROPERTIES [VALUE],[FORMATTED_VALUE],[CELL_ORDINAL],[FORE_COLOR]


Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Urgent Cell Calculation - 07-16-2005 , 01:32 AM






Can you possibly provide a sample Foodmart MDX query illustrating the
problem, because this seems to work:

Quote:
With
Member [Measures].[Month Sales Value] as
'Sum({[Time].CurrentMember}, [Measures].[Unit Sales])'
Cell Calculation INDICATOR
For '( {[Measures].[Month Sales Value]} )'
As 'CalculationPassValue(Measures.CurrentMember, -1 , Relative )',
CONDITION =
' CalculationPassValue( [Measures].[Month Sales Value], -1,Relative ) >
( ([Time].PrevMember,Measures.[Month Sales Value]) * 1.01)' ,
FORMAT_STRING ='##,##.##; (##,##.##) ; \Z\e\r\o', FORE_COLOR ='11004',
CALCULATION_PASS_NUMBER ='2', CALCULATION_PASS_DEPTH ='1'

SELECT {[Measures].[Unit Sales],[Measures].[Month Sales Value]} ON
COLUMNS,
Descendants([Time].[1997], [Time].[Month]) ON ROWS
FROM [Sales]
CELL PROPERTIES [VALUE],[FORMATTED_VALUE],[CELL_ORDINAL],[FORE_COLOR]
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.