3 Replies Latest reply: May 17, 2012 9:37 AM by Vladimir Kostochka

# Condition with variables

Hi all,

I have variables

v1=Sqr(Stdev({<[A]={'aaa'}>}[C]))

v2=Count({<[A]={'aaa'}>}[C])

How can I add condition B='bbb' to this expression?

([1st Time]-after([1st Time]))/SQRT(((\$(v2)+after(\$(v2)))/(\$(v2)*after(\$(v2))))*(\$(v1)*(N-1)+after(\$(v1))*(after(\$(v2))-1))/(\$(v2)+after(\$(v2))-2))

B='bbb' uses for v1 and v2.

• ###### Condition with variables

Who knows how to add SET ANALYSIS for

SQRT(((\$(v2)+after(\$(v2)))

I need B='bbb'

Thanks,

• ###### Condition with variables

Set analysis works in aggregation functions, and SQRT is not one of them.  Without trying to understand your logic - may be you can just add the condition to your variables?

v1=Sqr(Stdev({<[A]={'aaa'}, B={'bbb'}>}[C]))

v2=Count({<[A]={'aaa'}, B={'bbb'}>}[C])

• ###### Condition with variables

Hi Michael,

My variable B has 14 different tags(aaa,bbb,ccc,...., fff).

I try to replace B from v1 and v2 to in an expression. Because A is constant for all charts, only B changed in each chart. Other words, I need to add 28 variables, if I add B to your case.

I try to find a trick.