Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

saumyashah90
Valued Contributor

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

2 Replies

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')))



talk is cheap, supply exceeds demand
saumyashah90
Valued Contributor

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

Community Browser