Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

How to query the expression statistics data

Hey guys,

I'm Chinese,English so poorly,I hope someone can know my question

The form have a input box (we can input two nums),and have a btn,we can use btn search the data from chart,and data is expression statistics .the expression is

if(rzxxcs <> '' and rzsxcs <> '',
if(Count (??ID) >= rzxxcs and count(??ID)<= rzsxcs,count(??ID)),
if(rzxxcs = '' and rzsxcs <> '',
if(count(??ID)<= rzsxcs,count(??ID)),
if(rzsxcs = '' and rzxxcs <> '',
if(Count (??ID) >= rzxxcs ,count(??ID)),
count(??ID)
)
)
)


How do it use vb script actions?

My plan:

1.define fourvariables : NUM_SX,NUM_XX,rzxxcs,rzsxcs

2.define the variables NUM_SX,NUM_XX to Input boxs

3.vb script action

' Create By KanGwei in 2010/10/26

' get the value of variable

function getVarValue(p_varname)
getVarValue=activeDocument.variables(p_varname).getContent.string
end function

' set the value to variable

sub setVarValue(p_varname,p_varvalue)
dim d_var
Set d_var=ActiveDocument.Variables(p_varname)
d_var.setContent p_varvalue,true
end sub

' Search action

sub s_dosearch

dim d_sx,d_xx

d_sx = getVarValue("NUM_SX")
d_xx = getVarValue("NUM_XX")

' ???? ?? ???? Error info
if d_sx < d_xx then
msgbox "????????????"
' All Passed?Do Search
elseif d_sx >= d_xx then
call setVarValue("rzxxcs" ,d_xx)
call setVarValue("rzsxcs" ,d_sx)
end if

end sub

Now ,I have two problems:

1.Do you have another method do it?(I hope you can give me a QVW)

2.After search,How to clear the variable in the expression ?

Thanks!!!

My Msn:willking6517@live.cn

Tags (1)
3 Replies
Not applicable

How to query the expression statistics data

No body can answer me[:'(]

Not applicable

How to query the expression statistics data

No body can answer me[:'(]

pablolabbe
Valued Contributor II

How to query the expression statistics data

Why you need variables to define search criteria ? Can you explain the purpose of the expression ?