Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
newuser
Creator II
Creator II

AGGR in IF Statement Does Not Generate Expected Results

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)

Labels (1)
0 Replies