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

Set Analysis / variable

Hi holks,

I want to be able to use some set analysis in a text box but instead of sum of Sales of whatever I want to call a variable

This is what I have in my text box

=num(sum({<CURRENT = {1},MOBILE = {1}>} vHeatMetric),'###########,###')

This is what is in vHeatmetric

=if((vHeatGetListbox)='Email',$(vEx_Op_EMAIL),if((vHeatGetListbox)='Mobile',$(vEx_Op_MOBILE),0.00))

Within vEx_Op_EMAIL for example we have this:

count(distinct{$<Email_Flag={'1'}>}  CUSTID) / count( DISTINCT  CUSID)

Right now the text box is giving me the result of vEx_Op_EMAIL but is basically ignoring the set analysis part

Thanks

Stuart

7 Replies
sunny_talwar

You cannot have aggregation within aggregation without an Aggr function. Since you variable includes Count() function, the best way would be to add all your set analysis to the variable itself.

Not applicable
Author

Hi Sunny,

I have 36 text boxes with differrent set analysis in each, we want to be able to cycle through 7 metrics.

Dont want to create 252 variables for that though. 😕

sunny_talwar

There might be another way to do this. Can you share a smaller sample of what you trying to do?

Not applicable
Author

hi - have edited the original post with small sample of the data

Anonymous
Not applicable
Author

Hi

There is only customer   (CUSTID=16) who is in  both segment 3 and segment 4 count = 1

due you want this % with renaming count EMAIL  count= 16 ?

i.e   1 / 16 =   6.25 %  !!!??

Not applicable
Author

yes, its only sample data to show the structure

Not applicable
Author

is it possible to pass a variable to use as a field name in set analysis? I am trying this but QV stills ignores