Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Set Analysis

Hi I am trying to find the  count of unique number of countries which have the sum of sales from year 2009 greater than 35000. But I ended getting 0 as my result. But there countries with sum of sales from 2009 greater than 35000. Please find the code:

=count({(<country={"=SUM({<year={'>=2009'}>}sales)>13000"}>)} distinct country)

 

 

1 Solution

Accepted Solutions
Highlighted

Re: Set Analysis

Try this

=Count({<country = {"=Sum({<year={[>=2009]}>}sales) > 13000"}>} distinct country)

View solution in original post

6 Replies
Highlighted
Contributor II
Contributor II

Re: Set Analysis

Sorry it is not 13000 it is 35 in the code part

Highlighted
Partner
Partner

Re: Set Analysis

It could be syntax related,  I made some minor changes to the parentheses in your expression

=count({<

country={"=SUM({<year={'>=2009'}>}sales)>13000"}

>} distinct country)

 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Contributor II
Contributor II

Re: Set Analysis

The code is working if we select only one year but when we are using ">=2009" in place of just "2009" it is not working.

Highlighted

Re: Set Analysis

Try this

=Count({<country = {"=Sum({<year={[>=2009]}>}sales) > 13000"}>} distinct country)

View solution in original post

Highlighted

Re: Set Analysis

Or this

=Count({<country = {"=Sum({<year={"">=2009""}>}sales) > 13000"}>} distinct country)
Highlighted
Contributor II
Contributor II

Re: Set Analysis

Thanks Sunny, The code is working.