Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Set analysis - excluded issue

Hi all,

I'm fairly new to set analysis.

I am trying to calculate all references where it took less than 30 days, ignoring the selection in the filter.

I have created an expression using set analysis but it doesn't return the correct values. ie.

COUNT({$<Reviewer=>} if([Days Taken] < 30,1,0)), instead it returns all of the References for a Reviewer.

For AF it should be a total of 21 references which took less than 30 days - < 30 days taken.

25 is the total, which it is returning instead.

Furthermore, I want the to ignore the Reviewer selected in the filter, so that is shows all Reviewers.

I've attached a sample .qvf to see how I'm calculating this.

Many thanks!

Any tips would be appreciated.

3 Replies

Re: Set analysis - excluded issue


Use this expression.

COUNT({<Reviewer = , [Days Taken] = {"<30"}>} Reference)


Kaushik Solanki


Re: Set analysis - excluded issue

I prefer Kaushik Solanki‌ solution, but if you want to stick with if condition, you need a Sum, instead of count:

Sum({$<Reviewer=>} if([Days Taken] < 30,1,0))

Because Count of 0 and 1 are end up being the total. or you can try this:

Count({$<Reviewer=>} if([Days Taken] < 30,1))

Esteemed Contributor III

Re: Set analysis - excluded issue