Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

variable with set analisys

hi all,

trying to count orders that are above value in a variable,

tried like this :

Count(DISTINCT{$<'$(vValue)' >= {'3'} >} order_id)

but.. wont work, any ideas?

11 Replies
trdandamudi
Master II
Master II

May be as below:

=Count(Distinct {$<'$(vValue)' = {'>= 3'}>}order_id)

If this doesn't work, can you please share the value in the variable vValue

ecolomer
Master II
Master II

which is the content of vValue??

qlikviewwizard
Master II
Master II

Can you provide the sample data and expected output?

ilanbaruch
Specialist
Specialist
Author

hi,

vValue holds:  sum(flag_field)

flag_field contains (0/1)

ilanbaruch
Specialist
Specialist
Author

hi,

vValue holds:  sum(flag_field)

flag_field contains (0/1)

trdandamudi
Master II
Master II

It is little confusing, because you are saying flag_field contains (0/1) but in the expression you want to check for >=3 ?. Can you please share a sample app with desired output.

ilanbaruch
Specialist
Specialist
Author

my apologies,

flag_field contain 0/1 ;

and the value in  the variable  is an aggregation of flag_field: sum(flag_field)

trdandamudi
Master II
Master II

Got it... Did you tried the expression ? If not are you getting any error ?

ilanbaruch
Specialist
Specialist
Author

no error in the editor , but wrong calc..