Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i am trying to set the value of a variable in a formula, but unfortunately it does not work.
i have a diagram where i present a green, yellow or red icon depending on the result of if statements.
at the same time i would like to count the number of greens, yellows and reds and save the count in variables vGreen, vYellow and vRed.
is this somehow possible ?
Thanks a lot for any hints and ideas.
regards,
K
Hi,
Create variables by clicking Ctrl+Alt+V and write some thing like
Without set analysis
vGreen = Count( If( TestClass = 'Exam' ,Success) >= PassRequired, Success )
vYellow = Count( If( TestClass = 'Exam' ,Success) > 0, Success )
vRed = Count( If( TestClass = 'Exam' ,Success) = 0, Success )
Or i dont know what is your condition but you have to do like this or use set analysis also
And use this variable value in text box to display value like
=$(vGreen)
Rgds
Anand
Hi,
Use the same condition like you use in showing greens, yellows and reds use individuals color value condition in vGreen, vYellow and vRed variables.
Rgds
Anand
see the attached file
hope this heelp
@ Anand: thanks for the prompt reply.
just to understand correctly:
- these are my conditions to show the icons:
//green if all
= if ( count ( {$<TestClass={Exam}>} Success) >= PassRequired, 'qmem://<bundled>/BuiltIn/led_g.png',
//yellow if at least something passed
if ( count ( {$<TestClass={Exam}>} Success) > 0, 'qmem://<bundled>/BuiltIn/led_y.png',
//red if nothing
if ( count ( {$<TestClass={Exam}>} Success) = 0 , 'qmem://<bundled>/BuiltIn/led_r.png',
)
)
)
- and for the variables you suggest to do it this way ?
//green if all
= if ( count ( {$<TestClass={Exam}>} Success) >= PassRequired, vGreen +1,
//yellow if at least something passed
if ( count ( {$<TestClass={Exam}>} Success) > 0, vYellow +1,
//red if nothing
if ( count ( {$<TestClass={Exam}>} Success) = 0 , vRed +1,
)
)
)
... if this is the case: i tried it this way (selected to not show the formula in the diagram) and showed the variables in 3 different text boxes. (in initialized the variables with 0 ( vGreen = 0; etc)) and they never change their value. so my text boxes always show 0....
what am i doing wrong ?
@Sunil Chauchand: No, this is not what i am looking for. I actually want to count the appearances of grens, reds, yellows and store this value in variables...
thanks a lot!
Hi,
Create variables by clicking Ctrl+Alt+V and write some thing like
Without set analysis
vGreen = Count( If( TestClass = 'Exam' ,Success) >= PassRequired, Success )
vYellow = Count( If( TestClass = 'Exam' ,Success) > 0, Success )
vRed = Count( If( TestClass = 'Exam' ,Success) = 0, Success )
Or i dont know what is your condition but you have to do like this or use set analysis also
And use this variable value in text box to display value like
=$(vGreen)
Rgds
Anand
Thanks! This did the job!
How would you do this using SetAnalysis ?