2 Replies Latest reply: Mar 5, 2013 8:03 AM by Saumya Shah

# calendar date(Start Date and End date) problem

What to write in expression for date condition if expression has three if conditions

=if(Avg(Metric_value)>=[Threshold-Red],'qmem://<bundled>/Buletin/led_r.png',

if(Avg(Metric_value)>=[Threshold-Amber],'qmem://<bundled>/Buletin/led_y.png',

if(Avg(Metric_value)>=[Threshold-Green],'qmem://<bundled>/Buletin/led_g.png','qmem://<bundled>/Buletin/cross.png')))

i have date condition

=Avg({<Date={'>=\$(Start_Date)<=\$(End_Date)'}>}Metric_Value)

how can i use it for three if conditions

• ###### Re: calendar date(Start Date and End date) problem

Create a variable vAvgMetric and use this as its value:

Avg({<Date={'>=\$(Start_Date)<=\$(End_Date)'}>}Metric_Value)

Then you can create an expression like:

=if( \$(vAvgMetric) >= [Threshold-Red], 'qmem://<bundled>/Buletin/led_r.png',

if( \$(vAvgMetric) >=[Threshold-Amber],'qmem://<bundled>/Buletin/led_y.png',

if( \$(vAvgMetric) >=[Threshold-Green],'qmem://<bundled>/Buletin/led_g.png',

'qmem://<bundled>/Buletin/cross.png')))

• ###### Re: calendar date(Start Date and End date) problem

hey Gysbert,

what problem is that...whenever Metric_Value=- or NULL den it should show cross.png...which it is not showing