MDX Query with parameter
i newbie ssas. have created cube having measures [total working days] , [total attendance] dimentions [employeename],[depatment],[working date] . claling ssas in sql reports. problem in how measures [total working days] , [total attendance] between 2 dates?
select non empty { [measures].[total working days], [measures].[total attendance] } on columns, non empty { ([employee].[employee name].[employee name].allmembers ) } on rows [employee cube] ..... ( search datetime )?
it seems didn’t create user-defined hierarchy. important time calculation. in case, try this:
select {[measures].[call count],[measures].[call duration]} on columns,
non empty {
filter(
[time].[ starttime]. [starttime],
cdate([time].[ starttime].currentmember.membervalue)> cdate ('2008/10/11 11:20am')
and
cdate([time].[ starttime].currentmember.membervalue)< cdate (''2008/10/12 03:20pm')
)
on rows
from [my cubes] ;
to achieve more complicated time calculation, need create user-defined hierarchy:
http://msdn.microsoft.com/en-us/library/ms166578.aspx
also, please read above links posted.
regards,
raymond
SQL Server > SQL Server Analysis Services
Comments
Post a Comment