SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Analysis Server and Reporting Services (2012)
 MDX Question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

yomi
Starting Member

India
25 Posts

Posted - 05/08/2014 :  07:47:42  Show Profile  Reply with Quote
Hi Guys,

I want to write MDX query to retrive 1 week data.
but for retring 1 week data i want qury like
if it is,
Monay then it will retrive 2 days data i.e sunday and monday
if it is,
Tuesday then it will retrive 3 days data i.e.sunday ,Monday and Tuesday
if it is,
Wednesday then it will retrive 4 dys data i.e.sunday ,Monday and Tuesday
and so on
if query runs on sunday then it will return 1 day data i.e. only for sunday





Yogesh

Edited by - tkizer on 05/08/2014 12:18:13

yomi
Starting Member

India
25 Posts

Posted - 05/09/2014 :  01:42:38  Show Profile  Reply with Quote
Hey Anybudy please replay ASAP.

Yogesh
Go to Top of Page

spudsully
Starting Member

Australia
2 Posts

Posted - 05/14/2014 :  21:40:06  Show Profile  Reply with Quote
Yogesh,

If your after an aggregation of a measure then a periods to date would be ok to use pending you have a date hierarchy available that uses Sunday as the start of the week.
sum
(
PeriodsToDate
(
<<Week Level name>>
,<<Current date Member>>
)
,<<Measure Value>>
)
)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000