Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dates in calculated measure

Status
Not open for further replies.

rhs55

Vendor
Mar 8, 2005
2
US
My cube is based on Active Directory data. Currently, the cube shows the users listed by region and country (Region:Country:User), with a measure based on the number of users. The cube can be sliced by the date that the user account was created.

The problem with this is that if you select anything but ALL dates, the measure shows only the number of users created within the selected date range. I want to add a calculated measure that will give the the total number of users that existed up until and including that create date, rather than just the create date itself.

Any suggestions on the MDX I would use to create the calculated measure?
 
I wasn't planning to reply to my own posting, but here is the solution that I've come up with in the calculated measure:

Sum(PeriodsToDate([DateCreated].[(All)]),
[Measures].[Accounts created])

This appears to be providing me with the desired results, but if someone sees a problem with this, I would appreciate the feedback. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top