Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Excluding Selections

Hi

Not sure the easiest way to do this but i have this formula for calculating average CSi Score, for each wave and across all leasing companies.  I have a selection box for activity and i wanted this result not to be changed by selecting anything in activity field, any ideas ?

=avg({<Country= {$(vMarket)}, CSi={'>=0'}, tfs= {'>=$(vMinFleetSize)<=$(vMaxFleetSize)'}, section1Loop= {$(vLeaseCo)}, Wave={'$(vWaveCurrLC)'}, Activity= >} CSi)/100

Thanks for you help much appreciated.


Sarah

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

When using Aggr, you need to apply the set analysis to the outside of the expr too, like below

=min({<Country= {$(vMarket)}, CSi={'>=0'}, tfs= {'>=$(vMinFleetSize)<=$(vMaxFleetSize)'}, LeaseCo= ,[Activity]= , Wave= {'$(vWaveCurr)'}   >} aggr(avg({<Country= {$(vMarket)}, CSi={'>=0'}, tfs= {'>=$(vMinFleetSize)<=$(vMaxFleetSize)'}, LeaseCo= ,[Activity]= , Wave= {'$(vWaveCurr)'}   >} CSi),section1Loop))/100

View solution in original post

6 Replies
anbu1984
Master III
Master III

Activity= -- This will ignore any selection on Field Activity


Are you not getting correct result?

ThornOfCrowns
Specialist II
Specialist II

You can use <[SelectionField}=,> to ignore that field.

Not applicable
Author

When inside set analysis you do 'Field =' it will ignore any selections in that field. For your example your code should work.

Not applicable
Author

didn't seem to work tried both ways am i doing something wrong ?

=min(aggr(avg({<Country= {$(vMarket)}, CSi={'>=0'}, tfs= {'>=$(vMinFleetSize)<=$(vMaxFleetSize)'}, LeaseCo= ,<[Activity]= , Wave= {'$(vWaveCurr)'}   >} CSi),section1Loop))/100

CELAMBARASAN
Partner - Champion
Partner - Champion

When using Aggr, you need to apply the set analysis to the outside of the expr too, like below

=min({<Country= {$(vMarket)}, CSi={'>=0'}, tfs= {'>=$(vMinFleetSize)<=$(vMaxFleetSize)'}, LeaseCo= ,[Activity]= , Wave= {'$(vWaveCurr)'}   >} aggr(avg({<Country= {$(vMarket)}, CSi={'>=0'}, tfs= {'>=$(vMinFleetSize)<=$(vMaxFleetSize)'}, LeaseCo= ,[Activity]= , Wave= {'$(vWaveCurr)'}   >} CSi),section1Loop))/100

Not applicable
Author

Thanks so much guys works perfectly !