Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Tuning the Expression

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

Labels (1)
0 Replies