Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sspawar88
Creator II
Creator II

Creating Valid Script for two tables.

Hi,

In bar Chart i'm using following expression.

if(param_name='TEMP' and (param_value)<='-1' and (param_value)>= '-10', 'Red',

if(param_name='TEMP' and (param_value)<= '-10.1' and (param_value)>='-13.9', 'Yellow',

if(param_name='TEMP' and (param_value)<= '-14' and (param_value)>='-17.9', 'Amber',

if(param_name='TEMP' and (param_value)<= '-18', 'Green'))

))

above Expression is works at script in Qlikview but not works in Qlik sense?

Can you please assist this in Qlik sense?

5 Replies
Ralf-Narfeldt
Employee
Employee

I think you need to describe more what you want to achieve. In which property of the bar chart do you use this expression?

sspawar88
Creator II
Creator II
Author

stack bar chart. but by using this at UI level implies extra load on Application..and when i use it at Script it gives incorrect value in Qlik sense but correct in Qlikview.

Ralf-Narfeldt
Employee
Employee

Do you have a script example?

sspawar88
Creator II
Creator II
Author

LOAD

  if(param_name = 'Temperature',

      if(param_value <= -18, 'D',

       if(param_value >= -17.9 and param_value <= -14 , 'C',

           if(param_value >= -13.9 and param_value <= -10.1 , 'B',

            if(param_value >= -10 and param_value <= -1, 'A'))))) AS BANDS

resident iot_tx_data;

Above script works in Qlikview not in Qlik sense


i.e    Gives correct data as per this script in qlikview.

        Qlik sense gives wrong data.

Ralf-Narfeldt
Employee
Employee

Do you have some input data, and expected output data?

iot_tx_data:

LOAD * INLINE [

param_name, param_value

Temperature, -17

Temperature, -19

Temperature, -1

Something else,9

];

bands:

LOAD

  if(param_name = 'Temperature',

      if(param_value <= -18, 'D',

       if(param_value >= -17.9 and param_value <= -14 , 'C',

           if(param_value >= -13.9 and param_value <= -10.1 , 'B',

            if(param_value >= -10 and param_value <= -1, 'A'))))) AS BANDS

resident iot_tx_data;

This gives C, D, A and a Null as output in BANDS, as I would expect to.