dbTalk Databases Forums  

problem in MTD calculation from week MDX query

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


Discuss problem in MTD calculation from week MDX query in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Prasanna
 
Posts: n/a

Default problem in MTD calculation from week MDX query - 01-05-2004 , 07:25 AM






Hi,
I was trying to get MTD for the filtered week in the query
but the query is syntactically correct but result pane gives #Err for
MTD calculations
Can any one please help
The query is as below

with Member measures.[TNS] as ' [Measures].[Sale Qty In Tons] '
member measures.[NPS] as '[Measures].[Sale Value In Lacs] '
member measures.[TNS Growth Week %] AS '([Measures].[Sale Qty In
Tons]-([Measures].[Sale Qty In Tons],PARALLELPERIOD([Time].[JC].[JC
Week])))/([Measures].[Sale Qty In Tons])* 100'
member measures.[NPS Growth Week %] AS '([Measures].[Sale Value In
Lacs]-([Measures].[Sale Value In Lacs],PARALLELPERIOD([Time].[JC].[JC
Week])))/([Measures].[Sale Value In Lacs])* 100'
member measures.[MTD TNS] AS 'Sum(MTD([Time].[JC].[JC
Week].[wk47.2003].Lastsibling), [Measures].[Sale Qty In Tons])'
member measures.[MTD NPS] AS 'Sum(MTD([Time].[JC].[JC
Week].[wk47.2003].Lastsibling), [Measures].[Sale Value In Lacs])'
select
{measures.[TNS],measures.[NPS],measures.[TNS Growth Week %],
measures.[NPS Growth Week %],measures.[MTD TNS], measures.[MTD NPS]}
on columns,
{[Product].[Category],[Product].[Category].[Segment].members} on
rows
from [Primary Sales]
WHERE [Time].[JC].[JC Week].[wk47.2003]

MTD TNS and MTD NPS gives #Err in result pane in MDX Query builder
application where i have tried this query

Let me explain, the result should be displayed for the filtered query
for the Week Selected and the MTD values should be displayed for the
start of the month to the Last date of the selected week
Please help it's urgent

Regards
Prasanna

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

Default Re: problem in MTD calculation from week MDX query - 01-05-2004 , 03:20 PM






What does the [Time].[JC] hierarchy look like - if it has
Year/Month/Week/Day, can the weeks overlap 2 months (there is presumably
a Month level above the [JC Week])?

Also, why is the specific week (#47) explicitly used in defining the 2
MTD measures, since the filter implies it?


- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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.