4 Replies Latest reply: Mar 25, 2013 5:30 PM by Maxim Senin

# Expresion that displays between and greater than values

Hi -

Can someone please help me write two expressions that will help with displaying the following:

1. Values that are >\$100 and <\$999

2. Values that = \$1000 and greater

Thank you for your help!

• ###### Re: Expresion that displays between and greater than values

Hi

Try like this

=Sum({<Values = {">100 < 999"}>}Sales)

=Sum({<Values = {">=1000"}>}Sales)

Hope it helps

• ###### Re: Expresion that displays between and greater than values

See attached for set analysis example.

• ###### Re: Expresion that displays between and greater than values

Thank you that worked! Is there any way to hide 0's?

• ###### Re: Expresion that displays between and greater than values

Hi

Personally I use three approaches:

1. use of set analysis, something like this - Sum({<Revenue={">=101<=998"}>} Revenue)

2. use of class() function in a calculated dimension - please refer to manual and samples

3. precalculated (i.e. in load script) "price basket" - a  value assigned to a new field of transaction basing on a range of values, i.e. the field contains "100-999" if its value is >100 and <999, ">1000" if its values is >1000 and so on.

1st and 2nd are quick in implementation, but affects performanc too much, 3rd requires more work but corresponds to best practice from performance point of view.

Best regards,

Maxim