7 Replies Latest reply: Aug 25, 2011 7:08 AM by Onur Civelek

# Define Ranges in Textboxes

Hi together,

how can simply define quality ranges ?

I have a long formula like that calculate the qualitylevel from 0 to 100

= if (num(100 - (Count(DISTINCT{<FIELDVALIDATION={'invalid'}>}[HEL_DATA_Flight ID])/ count(DISTINCT [HEL_CAMPAIGN_Flight ID]) * 100),'0,000')

How can i get a Textresult that depends on the value which was above calculated.

Example: The above long term be variable X

X      >     69       AND     X      <      93,31 Textoutput Qualitylevel sigma 2

X      >     93,31  AND      X      <      99,31  Textoutput Qualitylevel sigma 3

X      >     99,31  AND      X      <      99,97  Textoutput Qualitylevel sigma 4

any idea ?

Thank you !

• ###### Define Ranges in Textboxes

Hi.

To achieve this you need to put the condition in X variable and use to check this condition

X >69 AND X < 93,31       output Qualitylevel sigma 2

X >93,31 AND X < 99,31  output Qualitylevel sigma 3

X >99,31 AND X < 99,97  output Qualitylevel sigma 4

like put condition in variable X= if (num(100 - (Count(DISTINCT{<FIELDVALIDATION={'invalid'}>}[HEL_DATA_Flight ID])/ count(DISTINCT [HEL_CAMPAIGN_Flight ID]) * 100),'0,000')

and check this with

\$(X) >69 AND \$(X) < 93,31       output Qualitylevel sigma 2

\$(X) >93,31 AND \$(X) < 99,31  output Qualitylevel sigma 3

\$(X) >99,31 AND \$(X) < 99,97  output Qualitylevel sigma 4

Regards

Anand

• ###### Define Ranges in Textboxes

Hi Anand,

how can i put this condition into a variable ? Let and Set didnt work !

Thank you!

Best Regards,

Hon

• ###### Define Ranges in Textboxes

Hi,

Create a variable from variable window by pressing Ctrl+Alt+V and add a variable there and put your test condition there by writing or copy paste over there in Definition window.

Regards

Anand

• ###### Define Ranges in Textboxes

Thank you

• ###### Define Ranges in Textboxes

Hello QV Community,

are there objects in a way to define a classic switch statement ?

If so, how it looks? In the documentation I have found a switch statement, but unfortunately only for sql

Thank you.

• ###### Define Ranges in Textboxes

hi

Try like this in the text object

=if( \$(x)>69 AND \$(x) < 93.31,       'output Qualitylevel sigma 2') & '

' &
if( \$(x)>93.31 AND \$(x)< 99.31 , 'output Qualitylevel sigma 3')   & '

' &

if( \$(x) >99.31 AND \$(x)< 99.97,  'output Qualitylevel sigma 4')

• ###### Define Ranges in Textboxes

Hi,

You also try some thing like this to check your values for the conditions

=If ( \$(X) >69 AND \$(X) < 93,31, 'output Qualitylevel sigma 2',

If ( \$(X) >93,31 AND \$(X) < 99,31, 'output Qualitylevel sigma 3',

If ( \$(X) >99,31 AND \$(X) < 99,97,  'output Qualitylevel sigma 4')))

Regards

Anand