Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Tags (1)
1 Solution

Accepted Solutions
Not applicable

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

Hi Spencer.

This would be the syntax:

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

does it work?

Erica

2 Replies
Not applicable

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

Hi Spencer.

This would be the syntax:

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

does it work?

Erica

Not applicable

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

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, '"|"')

& '")'

Community Browser