Qlik Community

Qlik Sense on AWS & Azure

Discussion board where members can learn more about Qlik Sense deployments on Public Cloud Infrastructures such as AWS and Azure.

ziabobaz
Contributor II

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!

Tags (3)
1 Solution

Accepted Solutions
Not applicable

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

4 Replies
sanjay006
Contributor

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

Hi Aitov


Try This


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

Not applicable

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

sanjay006
Contributor

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.

Not applicable

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

replace the 50 with 100 little typo there