# New to QlikView

Discussion board where members can get started with QlikView.

Contributor

## Invalid dimension error in filter

Hi All, I am using the following expression on one of my dimension in filter, and it is throwing an error -Invalid dimension. Formulae:

if(Sum([Equivalent Total Sale Quantity])>=sum(total [Equivalent Total Sale Quantity])/COUNT(total DISTINCT [Territory Name]),

if((sum([Total Volume]*[Sales Current Month])-sum([Total Volume]*[Sales Previous Month]))/sum([Total Volume]*[Sales Previous Month])>=0,'R','G'),

if((sum([Total Volume]*[Sales Current Month])-sum([Total Volume]*[Sales Previous Month]))/sum([Total Volume]*[Sales Previous Month])>=0,'Y','B'))

Please let me know where am I going wrong.

Thanks,

Best Regards,

1 Solution

Accepted Solutions MVP

## Re: Invalid dimension error in filter

May be this

Aggr(

if(Sum([Equivalent Total Sale Quantity])>=sum(total [Equivalent Total Sale Quantity])/COUNT(total DISTINCT [Territory Name]),

if((sum([Total Volume]*[Sales Current Month])-sum([Total Volume]*[Sales Previous Month]))/sum([Total Volume]*[Sales Previous Month])>=0,'R','G'),

if((sum([Total Volume]*[Sales Current Month])-sum([Total Volume]*[Sales Previous Month]))/sum([Total Volume]*[Sales Previous Month])>=0,'Y','B')),

[Territory Name])

6 Replies MVP

## Re: Invalid dimension error in filter

You can use If(Aggr(Sum, Field) ....., If(Aggr(..... then only Calculated condition works

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context) MVP

## Re: Invalid dimension error in filter

May be this

Aggr(

if(Sum([Equivalent Total Sale Quantity])>=sum(total [Equivalent Total Sale Quantity])/COUNT(total DISTINCT [Territory Name]),

if((sum([Total Volume]*[Sales Current Month])-sum([Total Volume]*[Sales Previous Month]))/sum([Total Volume]*[Sales Previous Month])>=0,'R','G'),

if((sum([Total Volume]*[Sales Current Month])-sum([Total Volume]*[Sales Previous Month]))/sum([Total Volume]*[Sales Previous Month])>=0,'Y','B')),

[Territory Name])

Contributor

## Re: Invalid dimension error in filter

Thanks a lot. This works fine. Contributor

## Re: Invalid dimension error in filter

Now the problem I am facing is that the average(sum(total [Equivalent Total Sale Quantity])/COUNT(total DISTINCT [Territory Name]) changes once the filter is applied. This ends up in a way that the filter shows multiple selections even if I select one. Please help.

Thanks, MVP

## Re: Invalid dimension error in filter

May be ignore selection using set analysis? I am not fully sure what you are trying to do, to give you a specific expression... but if you can share a sample, I might be able to help

Contributor

## Re: Invalid dimension error in filter

Thanks, I am new to Qlik Sense and wasn't familiar with set analysis. It is helpful and solved my problem. Thanks.