Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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,
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])
You can use If(Aggr(Sum, Field) ....., If(Aggr(..... then only Calculated condition works
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])
Thanks a lot. This works fine.
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,
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
Thanks, I am new to Qlik Sense and wasn't familiar with set analysis. It is helpful and solved my problem. Thanks.