Semi-Additive Measure Aggregation


 

hi,

 

i'm tearing hair (what's left of it!) out trying achieve in ssas 2005, , wonder if can before go mad! basic scenario i'm trying model is thus:

 

funds, made of number of:

investments, made of number of:

allocations, represent unit holdings.

 

now there may many allocations per investment, , each of these allocations (hence unit holdings) may change @ various points in time. fact table i'm using has entries representing current unit holding @ given date. example of fact table i'm using:

 

date            fund id  investmentid   allocationid   unitholding

2008-08-01        1                1                     1                     10

2008-08-03        1                1                     1                     20 (representing 10 unit holding increase)

2008-08-07        1                1                     1                     15 (representing 5 unit holding decrease)

2008-08-01        1                1                     7                     30

2008-08-15        1                1                     7                     10 (representing 20 unit holding decrease)

2008-08-21        1                2                     9                     15

2008-08-25        1                2                     9                     10 (representing a 5 unit holding decrease)

 

hence, if i wish find unit holdings given day, interested in lastnonempty value unitholding measure. instance, if want see unit holding allocation 1 on, say, 2008-08-10, value of 15. fine. however, want achieve, if want see unitholding @ lower level of granularity, investment, hope see sum of lastnonempty values each constituent allocation. in example, investmentid1 on 2008-08-20, hope see unitholding of 15 + 10 = 25. seeing, value of 10, since, guess, lastnonempty value investmentid 1. likewise upward levels of granularity.

 

so, in summary, i'm trying achieve measure uses lastnonempty aggregation @ highest level of granularity, these values summed @ lower granularities in hierarchy. have thought pretty standard functionality (say aggregating number of items held in stock across number of sites @ point in time, say), i'm feeling bit mr. thicky having particularly thick day @ moment , getting fast, amazingly welcome!

 

many thanks,

 

rob

 

if correct, trying have different aggregations measure @ different levels of dimension. can't think of solution except using calculated member.


SQL Server  >  SQL Server Analysis Services



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........