Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can a function be used as the basis for set analysis?

Hi all,

I'm trying to create a select in field action by using the concat function, but I'm having an issue with the set analysis.

I need to limit my product selection to just products which are sold in >50% of stores, so I'm trying the set analysis:

{(<count(DISTINCT store_counter_cur)={">.5*$(vTotalStores)">)}

I don't think anything can be done in script to per-aggregate, as it's dependent on the current store selection, as well as the timeframe.  Qlikview doesn't seem to like having an aggregation function in the set analysis however.

Is there another way to do this?

Thanks, Spence

1 Solution

Accepted Solutions
Not applicable
Author

Hi Spencer.

This would be the syntax:

{$<Store= {“=count(distinct store_counter_cur ) > 0.5*$(vTotalStores)”}>}

does it work?

Erica

View solution in original post

2 Replies
Not applicable
Author

Hi Spencer.

This would be the syntax:

{$<Store= {“=count(distinct store_counter_cur ) > 0.5*$(vTotalStores)”}>}

does it work?

Erica

Not applicable
Author

Yes that got it, thanks a lot!

For everyone else's benefit, the full code is:

='("'&

Concat(

{$<Product={"=count(DISTINCT store_counter_cur) > 0.5*$(vTotalStores)"}>}

Product, '"|"')

& '")'