I have the following expression testing whether the measure in green is positive. If so, return it, else don't. This logic does not seem to be working, i.e., negative values are being returned. Is it because of the set analysis utilization? Because when I rewrite the green measure below WITHOUT using set analysis, then negative values are correctly excluded?
if(sum({1 <Month_Placed ={"<=$(=CurrMonth)"}, TranYr = {$(=CurrYr)} >}
if(placedt_all=aggr({1} nodistinct max({1} placedt_all),acctpol), Placed))
+ sum({1 <Month_Placed ={"<=$(=CurrMonth)"}, Year_Placed = {$(=CurrYr)} >}
if(placedt_all=aggr({1} nodistinct max({1} placedt_all),acctpol), Adjustment)))
> 0,
(sum({1 <Month_Placed ={"<=$(=CurrMonth)"}, TranYr = {$(=CurrYr)} >}
if(placedt_all=aggr({1} nodistinct max({1} placedt_all),acctpol), Placed))
+ sum({1 <Month_Placed ={"<=$(=CurrMonth)"}, Year_Placed = {$(=CurrYr)} >}
if(placedt_all=aggr({1} nodistinct max({1} placedt_all),acctpol), Adjustment)))
, 0)