Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
sunny_talwar

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
Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

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

Anonymous
Not applicable
Author

Thanks a lot. This works fine.

Anonymous
Not applicable
Author

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,

sunny_talwar

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

Anonymous
Not applicable
Author

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