# Qlik Sense App Development

New Contributor III

## if statement to reduce dimensions

I have an expression which calculates a % of coverage. I would like to limit the dimensions to where the coverage is 10% or more. The dimension is 'Insight' and the following is the expression for coverage (which i know works)

=count(if(isnull(Category) and ExcludeWord<>'Yes' and not(isnull(Topic)),Topic))/(sum(if(not(isnull(Category)),TopicFlag))+count(if(isnull(Category) and ExcludeWord<>'Yes' and not(isnull(Topic)),Topic)))

adding the expression into the if statement doesnt seem to be working

if(count(if(isnull(Category) and ExcludeWord<>'Yes' and not(isnull(Topic)),Topic))/(sum(if(not(isnull(Category)),TopicFlag))+count(if(isnull(Category) and ExcludeWord<>'Yes' and not(isnull(Topic)),Topic)))>0.1, Insight)

Tags (1)
1 Solution

Accepted Solutions
MVP

## Re: if statement to reduce dimensions

May be try this

Aggr(if(count(if(isnull(Category) and ExcludeWord<>'Yes' and not(isnull(Topic)),Topic))/(sum(if(not(isnull(Category)),TopicFlag))+count(if(isnull(Category) and ExcludeWord<>'Yes' and not(isnull(Topic)),Topic)))>0.1, Insight), Insight)

4 Replies
Esteemed Contributor

## Re: if statement to reduce dimensions

Hi,

what type of objects are you using to dispay the reduced dimensions?

New Contributor III

## Re: if statement to reduce dimensions

Just a bar chart

Esteemed Contributor

## Re: if statement to reduce dimensions

you can simply add the condition on the expression. did you try it ?

MVP

## Re: if statement to reduce dimensions

May be try this

Aggr(if(count(if(isnull(Category) and ExcludeWord<>'Yes' and not(isnull(Topic)),Topic))/(sum(if(not(isnull(Category)),TopicFlag))+count(if(isnull(Category) and ExcludeWord<>'Yes' and not(isnull(Topic)),Topic)))>0.1, Insight), Insight)