Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks ... can this expression be changed using Pick and Match instead of If conditions
if
(
(max(holiday_flag)=1 or max(sunday_flag)=1) and max(present_flag)=2
,
'qmem://<bundled>/BuiltIn/smiley1.png'
,
if
(
Max(present_flag)=2,
'qmem://<bundled>/BuiltIn/smiley1_g.png'
,
if
(
max(exclusive_livetrack_flag)=1,
'qmem://<bundled>/BuiltIn/smiley1_y.png'
,
if
(
(max(holiday_flag)=1 or max(sunday_flag)=1) and max(exclusive_livetrack_flag)=1
,
'qmem://<bundled>/BuiltIn/smiley3_r.png'
,
if
(
max(sunday_flag)=1,
'qmem://<bundled>/BuiltIn/plus_g.png'
,
if
(
max(biometric_abscent_flag)=1,
'qmem://<bundled>/BuiltIn/question_r.png'
)
)
)
)
)
)
You used multiple flag-fields and they seem not to be aligned to each other and therefore I think that your expression couldn't be improved very much but with some changes in the datamodel it could be possible.
This meant not just using a flag of 0 or 1 else to align the flags in a way that a:
rangesum/max/min/avg()
of your flags returned always an unique value which could then be used in a pick().
Maybe even easier might be to use a single flag-field to determine the various states of absence or presence.
- Marcus
You used multiple flag-fields and they seem not to be aligned to each other and therefore I think that your expression couldn't be improved very much but with some changes in the datamodel it could be possible.
This meant not just using a flag of 0 or 1 else to align the flags in a way that a:
rangesum/max/min/avg()
of your flags returned always an unique value which could then be used in a pick().
Maybe even easier might be to use a single flag-field to determine the various states of absence or presence.
- Marcus
Thanks a lot Marcus for the suggestion