Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
infosense_devel
Creator II
Creator II

Aggrigation Issue

Hello,

I have REGION column for Geo-Region like, Americas, APAC, EMEA.

And I have expression for Budget MTD like,

=if(REGION<>'APAC', Sum({$<Common_Date = {'>=$(=only(MonthStart(Common_Date))) <=$(=date(max(Today()-1)))'},REC_TYPE={'BudgetRec'}>} (DAILY_BUDGET*XRATE_CONST*RATE))

,
Sum({$<Common_Date = {'>=$(=only(MonthStart(Common_Date))) <=$(=date(max(Today())))'},REC_TYPE={'BudgetRec'}>} (DAILY_BUDGET*XRATE_CONST*RATE)))

When any of region is selected its behaving well but there were no selection for Region it will always True condition.

Because,

As of my understanding when no Region is selected at that time Geo-region is returning -(dash) and -(dash) is not equal to APAC, so its always true.

Thanks In Advance.

1 Reply
hic
Former Employee
Former Employee

Your condition REGION<>'APAC' will not behave well if there is more than one REGION. REGION will evaluate to NULL.

See Use Aggregation Functions!

HIC