Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
=if( MonthEnd ( MAX( Date ) ) <> var_EndDate AND MonthEnd( MAX ( Date ) )
= MonthEnd( var_EndDate ) ,
Sum( IF(Derived_Status <> 'LRSHP', TEU,0)) / Day( var_EndDate ) * Day(MonthEnd( MAX ( Date ) )) ,
sum( IF(Derived_Status <> 'LRSHP', TEU,0) ))
This code above is trying to compute the latest month data to be EXTRAPOLATED with a certain formula, else it will just display the value. However the value that it compute have only one condition which is Derived Status <> LRSHP
However, I would like to reuse this code and use to compute the sum with three condition as pasted below, I tried to use
=if( MonthEnd ( MAX( Date ) ) <> var_EndDate AND MonthEnd( MAX ( Date ) )
= MonthEnd( var_EndDate ) ,
Sum( IF(Derived_Status = TSHIP and Container_Class_Name = Empty and Unlocode_Port_Of_Loading = 'ID*', TEU,0)) / Day( var_EndDate ) * Day(MonthEnd( MAX ( Date ) )) ,
Sum( IF(Derived_Status = TSHIP and Container_Class_Name = Empty and Unlocode_Port_Of_Loading = 'ID*', TEU,0))
but no value was compute.
any help in this
Few errors in ur expression;
1) use ' ' : Derived_Status = 'TSHIP' and Container_Class_Name = 'Empty'
2) use wildmatch:
wildmatch(Unlocode_Port_Of_Loading, 'ID*')
3) missing ) at the end :
so correct expression:
=if( MonthEnd ( MAX( Date ) ) <> var_EndDate AND MonthEnd( MAX ( Date ) )
= MonthEnd( var_EndDate ) ,
Sum( IF(Derived_Status = 'TSHIP' and Container_Class_Name = 'Empty' and wildmatch(Unlocode_Port_Of_Loading, 'ID*'), TEU,0)) / Day( var_EndDate ) * Day(MonthEnd( MAX ( Date ) )) ,
Sum( IF(Derived_Status = 'TSHIP' and Container_Class_Name = 'Empty' and wildmatch(Unlocode_Port_Of_Loading, 'ID*'), TEU,0)))