![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| ValueOnHand = |
#3
| |||
| |||
|
|
ValueOnHand can be written non-recursively, but that may not necessarily improve performance by much: ValueOnHand = SUM(Descendants(StoresDim.CurrentMember,Stores.Sto re), SUM(Descendants(ProductsDim.CurrentMember,Products .Product), QtyOnHand * UnitPrice)) How many store/product combinations are typically being summed when querying for ValueOn Hand? Another performance issue likely is how QtyOnHand and UnitPrice are derived (presumably both are calculated measures), and whether anything can be done to improve performance there... - Deepak *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Wouldn't this be a classic case, whereby despite the fact that it can be done in Analysis Services, you are far better off doing some work in the database itself (via a derived table) and then providing the data to the cube in a more efficient format? Maybe add the closing balance to your transactions table (after each transaction), then you can get the last child that is less than the current date member. Assuming of course that you have access to update the original database. Cheers, Peter. |
#6
| |||
| |||
|
|
And this will be supported natively with SQL Server 2005 Analysis Services. One of the new aggregate functions (like you have to today with sum, min, max, count, etc.) will be "last child". To implement it, you must have a dimension (and only one dimension) which has been labelled as "Time" -- you can have multiple hierarchies in the dimensions, but it must only one Time dimension. -- Dave Wickert [MSFT] dwickert (AT) online (DOT) microsoft.com Program Manager BI SystemsTeam SQL BI Product Unit (Analysis Services) -- This posting is provided "AS IS" with no warranties, and confers no rights. "Deepak Puri" <deepak_puri (AT) progressive (DOT) com> wrote in message news:OGSvQZa2EHA.1860 (AT) TK2MSFTNGP15 (DOT) phx.gbl... ValueOnHand can be written non-recursively, but that may not necessarily improve performance by much: ValueOnHand = SUM(Descendants(StoresDim.CurrentMember,Stores.Sto re), SUM(Descendants(ProductsDim.CurrentMember,Products .Product), QtyOnHand * UnitPrice)) How many store/product combinations are typically being summed when querying for ValueOn Hand? Another performance issue likely is how QtyOnHand and UnitPrice are derived (presumably both are calculated measures), and whether anything can be done to improve performance there... - Deepak *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
![]() |
| Thread Tools | |
| Display Modes | |
| |