Page 1 of 1

How to Aggregate based on attribute value?

Posted: Wed Nov 17, 2010 1:57 am
by vinnusea
hi
I have a measure and products dimension

For some products the Attr value is 1 and rest all products its 0

There is Top level in Products Dim --Total By Product

I want Total by Product to have aggregated values of products with attr value 1

(Note: For whom attr value is 1 their measure is having Values and All Other Attr measure value is zero)

Re: Rules Editor Error..Need Help

Posted: Wed Nov 17, 2010 6:32 am
by rkaif
Double posting?

Re: How to Aggregate based on attribute value?

Posted: Thu Nov 18, 2010 4:33 pm
by vinnusea
Think so..
Do you have any Idea how can it be DONE??????

Re: How to Aggregate based on attribute value?

Posted: Thu Nov 18, 2010 5:40 pm
by tomok
['Filtered Amount']=N:IF(ATTRN('Product',!Product,FilterAttrName)=1,DB(Cube,Product, Dim2, Dim3,'Amount'),0);

Re: How to Aggregate based on attribute value?

Posted: Thu Nov 18, 2010 8:44 pm
by David Usherwood
Or even

Code: Select all

['Filtered Amount'] = N: ['Amount'] * ATTRN('Product',!Product,FilterAttrName);
Not that what @tomok wrote wouldn't work. I just feel that shorter is generally better.

Re: How to Aggregate based on attribute value?

Posted: Thu Nov 18, 2010 9:04 pm
by lotsaram
Or you can us a combination of TI and consolidations ...

Eg: have TI run through the dimension and if the attribute value is there then add the element to an alternate rollup. Not as dynamic as rules as it woudl require a user button click at some point but still very quick and much more efficient when it comes to memory use and calculation speed.

Re: How to Aggregate based on attribute value?

Posted: Thu Nov 18, 2010 9:38 pm
by vinnusea
yes i think need to go with some TI process to make aggregate based on Attr values...

Will give it a try and update this link back

Thank you