Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
jrahul9797
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
Highlighted

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])

View solution in original post

6 Replies

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)
Highlighted

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])

View solution in original post

Highlighted
jrahul9797
Contributor

Re: Invalid dimension error in filter

Thanks a lot. This works fine.

Highlighted
jrahul9797
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,

Highlighted

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

Highlighted
jrahul9797
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.