# New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for
Search instead for
Did you mean:
Creator III

## What values are my countries?

if(fabs((sum([Record Count]) - rangeavg(after(sum([Record Count]),1,6)))

/ rangeavg(after(sum([Record Count]),1,6)))

> Threshold OR sum([Record Count])=0,1,0)

I have the above expression which gives me a true or false value (1,0)

What I now want to do is for the true values, to give me the countries.

I would have assumed a little set analysis

=Sum({<

if(fabs((sum([Record Count]) - rangeavg(after(sum([Record Count]),1,6)))

/ rangeavg(after(sum([Record Count]),1,6)))

>= Threshold OR sum([Record Count])=0,1,0) >} Country)

but QV doesnt like this expression.

Any ideas on how to return my countries that are true?

1 Solution

Accepted Solutions
Creator III

First : you cannot sum countries, but you may count them

Second : You want to create a set analysis expression condition :

So it should be this expression (with [Country] in dimension):

count(distinct

{<

Country={<"=if(fabs((sum([Record Count]) - rangeavg(after(sum([Record Count]),1,6)))/ rangeavg(after(sum([Record Count]),1,6)))  >= Threshold OR sum([Record Count])=0,1,0)>0">}

>} Country)

1 Reply
Creator III

First : you cannot sum countries, but you may count them

Second : You want to create a set analysis expression condition :

So it should be this expression (with [Country] in dimension):

count(distinct

{<

Country={<"=if(fabs((sum([Record Count]) - rangeavg(after(sum([Record Count]),1,6)))/ rangeavg(after(sum([Record Count]),1,6)))  >= Threshold OR sum([Record Count])=0,1,0)>0">}

>} Country)

Tags