How to get YTD Average Weekly Sales
hello,
i have time dimension year->quarter->period->week->date. query filtered specific period (currentmember). need average weekly sales ytd. having hard time getting count of weeks ytd. query below give me count currentmember 4. suggestions? feel i've tried million different things no avail. have ytd calculated member time calc in cube, based off of current member. appreciated!
thanks,
melissa
create
member currentcube.[measures].[avg weekly sales per store ytd]
as
([measures].[sales ytd]) /
((
count(descendants([time].[fiscal].currentmember,[time].[fiscal].[week]),includeempty)) *
([measures].[account period store cnt ytd]))
well, seems have ask else in order see answer. :) should have posted last week! how able it:
count
(periodstodate([time].[fiscal].[year], closingperiod([time].[fiscal].[week], [time].[fiscal].currentmember)))
SQL Server > SQL Server Analysis Services
Comments
Post a Comment