Is there any way to make Count work properly on a measure group where aggregation for every single measure is set to LastNonEmpty?
Basically it's a fact table that contains periodic snapshots of data & so count only makes sense within the slice based on insertion time.
Thanks!
any help please?|||What kind of count do you want in this snapshot scenario - is it a count of all objects for which there is data - could you illustrate with some examples? And are the snapshots synchronized, or could they be created at different times?|||Here's an example:
Product Amount ImportDate
a 1 Jan 2007
b 10 Jan 2007
c 100 Jan 2007
a 2 Jan 2007
b 11 Feb 2007
b 12 Feb 2007
so in this case for Jan 2007 there's 2 products 'a' for a total amount of 3, so count =2.
for Feb 2007 there's 2 products 'b' for a total amount of 23
So basically the aggregation on the amount column is set to lastnonempty using 'import date' to determine the last child
so for the entire year 2007 for product B the amount would be equal to the amount from Feb 2007 - count =2, amount = 23.
But the count always runs across all dates & so for the set above & entire year 2007 it would return 3 for product b - not 2.
all the snapshots are done for the same set of products - they're common across all dates & it's product measures that are being aggregated.
|||Add a Named Calculation to the fact table like [LastCount] = 1, then create a corresponding measure: [LastCount], with LastNonEmpty aggregation.|||what a great idea - and how didn't I think of that?!
Thanks!
No comments:
Post a Comment