# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
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) 