4 Replies Latest reply: May 12, 2017 4:33 AM by adam steel

# Reference to the measure itself in the formula (without IF)

Hi,

Let's say I want to calculate a measure SUM( Sales ), but I want to show only the numbers above certain threshold (the others should return Null).

I can do it using if:

if( SUM (Sales) < 100, SUM (Sales), Null() )

Is there way to do the same without using IF, like using Set Analysis?

Smth like: SUM (   {< SUM(Sales)<{100} >}    [Sales] )

Thank you!

• ###### Re: Reference to the measure itself in the formula (without IF)

Hi Aitov

Try This

sum({<Sales={">=0<100"}>}Sales)

• ###### Re: Reference to the measure itself in the formula (without IF)

Hi,

the equivalent would be

sum({\$<sales={"<50"}>}sales)

I cannot take all the credit here i read this guide which i found really helpfull

A Primer on Set Analysis

• ###### Re: Reference to the measure itself in the formula (without IF)

replace the 50 with 100 little typo there

• ###### Re: Reference to the measure itself in the formula (without IF)

Dear Aitov

For that u need to take the Sum(Sale) field from back end using Aggr() function.