Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI all,
Can any one let me know the actual logic of below expression:?
Why Sum key is used in this logic ? Cant we use in IF statement as sum (TPressure) for every well name?
If(
Sum(
(Name of Well = 'BW B8' and (TPressure) > 10) or
(Name of Well = 'B1 o.B' and (TPressure > 5) or
(Name of Well = 'B2 o.B.' and TPressure > 5) or
(Name of Well = 'B5 o.B.' and TPressure > 5) or
(Name of Well = 'B4 m.B.' and TPressure > 5) or
(Name of Well = 'B1 M.' and TPressure > 5) or
(Name of Well = 'B2 M.' and TPressure > 5) or
(Name of Well = 'B3 M.' and TPressure > 5) or
(Name of Well = 'B4 M.' and TPressure > 5) or
(Name of Well = 'TB01' and TPressure > 3) or
(Name of Well = 'B1' and TPressure > 5) or
(Name of Well = 'B2' and TPressure > 5) or
(Name of Well = 'STO500' and TPressure > 5)
)
, RGB(242,28,10) , RGB(255,255,255))
Regards
MANU
Hi,
is it working ? just try to remove the Sum() and see if the colors is working properly
This won't give BG color. Reason is you need the condition like
If(Sum()= ..., Color1, Color2)
If(Sum()> ..., Color1, Color2)
If(Sum()< ..., Color1, Color2) ... ETC.
this expression should return color RGB(242,28,10) if any of the conditions bellow is true else RGB(255,255,255)
in case of removing the sum.
regards,
Hi Manu,
Your expression returns RGB(242,28,10) if one or more of the conditions in the Sum() are true, else RGB(255,255,255).
With the Sum it still returns that RGB(242,28,10) even if multiple values are possible or selected in a field, for example „Name of Well“ has ‘BW B8’ and ‘B1 o.B’ or more selected.
If you remove the Sum and use the ‘If’ only, then for example “Name of Well” has to have exactly one value (e.g. onl ‘BW B8’) to return RGB(242,28,10). If multiple values are possible or selected, then the result will be RGB(255,255,255).
Hope my comments helps you to understand the difference.
Kind regards
its is working
Sum() is used as logical "or" aggregation of the boolean expression, i.e. if any of the single terms aggregated over your dimension is true, then the if condition will be true thus returning RGB(242,28,10).
hope this helps
regards
Marco