Hi,
Is there a way to tune the below expression,My expression should only return value if sum>'0'.Please let me know your thoughts.
=sum(aggr(
if(sum ({$<CALENDAR_DATE={'>=$(=Date(VSTARTDATE))<=$(=Date(VENDDATE))'},GC_BUY_OR_REDEEM={'B'},
STORE_BH={'0'},STORE_CA={'0'},STORE_GCPO={'0'},STORE_TP={'0'}>} GC_BALANCE)-(0-(sum ({$<REDEMPTION_DATE={'>=$(=Date(VSTARTDATE))<=$(=Date(VENDDATE))'},GC_BUY_OR_REDEEM={'B'},
GC_BUY_OR_REDEEM_R-={'B'},GC_CARD_NUMBER-={'6098800000740686'},
STORE_BH={'0'},STORE_TP={'0'},STORE_CA={'0'},STORE_GCPO={'0'}>} REDEMPTION_AMOUNT)))<'0',
'0',
sum ({$<CALENDAR_DATE={'>=$(=Date(VSTARTDATE))<=$(=Date(VENDDATE))'},GC_BUY_OR_REDEEM={'B'},
STORE_BH={'0'},STORE_CA={'0'},STORE_GCPO={'0'},STORE_TP={'0'}>} GC_BALANCE)-(0-(sum ({$<REDEMPTION_DATE={'>=$(=Date(VSTARTDATE))<=$(=Date(VENDDATE))'},GC_BUY_OR_REDEEM={'B'},
GC_BUY_OR_REDEEM_R-={'B'},GC_CARD_NUMBER-={'6098800000740686'},
STORE_BH={'0'},STORE_TP={'0'},STORE_CA={'0'},STORE_GCPO={'0'}>} REDEMPTION_AMOUNT)))),GC_CARD_NUMBER))
Thanks,
Swetha