Using a role playing dim to do a ranged filter in a cube calculation
hi
i have seems simple question has been confusing me while.
i have time dimension (not yet set proper time dimension) used filter user query 1 particular period. there second date on measure group can used refine results event further if required.
however usage second date used less (<).
scenario: day1 value=1, day2 value=2, day3= value=3.
by default should shown agg of 6 (1+2+3)
however if user picks day2 result should 3 (1+2: day1+day2)
please advised have not yet setup proper time dimension , dimension being treated regular dimension (with role playing)
by default i have set default_member lastchild second date (rpd)
could annyone advise on mdx syntax needed calculations script. had made poor attempt @ scoping:
alter cube currentcube update dimension [date2].[date], default_member=[date2].[date].lastchild; scope ( [measures].[measure], [date2].[date].members ); = (sum({[date2].[date].firstchild:[date2].[date].currentmember})); end scope;
hi david,
can create calculated member getting running value dates. here sample code below
create member currentcube.[measures].[test] sum(null:[order date].[time calendar].currentmember,[measures].[sales amount]), format_string = "#,##0.00;-#,##0.00", non_empty_behavior = { [sales amount] }, visible = 1 ;
please let me know if have misunderstood post.
hth,
ram
ram
SQL Server > SQL Server Analysis Services
Comments
Post a Comment