10 Replies Latest reply: Sep 24, 2012 9:35 AM by michail R

# Calculated dimension

It is even possible to use the value of the Calculated dimension in expression

For example:

Calculated dimension- Aggr(Sum(Stock),Date)

Expression- Count(distinct  if(Sum(Sales)>'Calculated dimension',Date))

• ###### Re: Calculated dimension

You should be able to just use sum(Stock) instead of 'Calculated dimension' here. But since you embed an aggregation (sum()) into another aggregation function, you'll need to use advanced aggregation aggr() function here, too.

Or try:

=count({<Date = {"=sum(Sales)>sum(Stock)"}>} distinct Date)

• ###### Re: Calculated dimension

I do not care what happens in the expression and Calculated dimension,  I'm interested in the possibility of using the value of the Calculated dimension In expression

Calculated dimension=2

Expression= if(Calculated dimension=2,"two",null())

• ###### Re: Calculated dimension

And replacing your 'Calculated dimension' with the expression you are using in the aggr() function should / could work fine.

edit:

Ok, this only works if you only get one distinct underlying dimension value, back (i.e. Date in your sample). In general, you need to repeat the complete calculated dimension.

• ###### Re: Calculated dimension

I can not

formula will work correctly only in Calculated dimension

• ###### Re: Calculated dimension

Could you post a small sample app? Or your complete dimension and expression definitions?

• ###### Re: Calculated dimension

i can not

• ###### Re: Calculated dimension

I am interested in only one thing, is it possible to get the value of the Calculated dimension in expression

• ###### Re: Calculated dimension

If you have a calculated dimension like

=Aggr(Sum(Stock),Date)

an expression like

=Aggr(Sum(Stock),Date)

returns the dimension value. There is no function to "call" the calculated dimension value directly, AFAIR (edit: sorry, for the acronym,  http://en.wiktionary.org/wiki/AFAIR).

• ###### Re: Calculated dimension

not understood.

what is it afair?

• ###### Re: Calculated dimension

it's a pity

But thanks for that