starrynighter
asked on
Analysis services - MDX date calculation
Please advise if I'm in the wrong area to ask this.
I want to make a calculated member "age of employee" based on a dimension attribute
Employee.birth_date
Iimagine this would be something like
truncate( NOW() - Employee.birth_date )
IF MDX does date arithmetic !
Does it? and if so what syntax works?
Otherwise I have read a way ( media.wiley.com/product_da ta/excerpt / 67/04714004/0471400467.pdf dated June 2001)
to do this calling VBA!DateDiff
I want to make a calculated member "age of employee" based on a dimension attribute
Employee.birth_date
Iimagine this would be something like
truncate( NOW() - Employee.birth_date )
IF MDX does date arithmetic !
Does it? and if so what syntax works?
Otherwise I have read a way ( media.wiley.com/product_da
to do this calling VBA!DateDiff
We've always taken the route of using DATEDIFF--more robust and you can keep errors from popping up if bad data appears....
Note that you can use the DATEDIFF function that is intrinsic to TSQL, rather than the VBA one.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks both.
ASKER
Thanks both.