Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
FinancialDataScientist
Contributor II
Contributor II

Sum with conditions.

Hi all, 

I'm new to this forum so apologies in advance if I've posted this question in the wrong place. 

I'm trying to create a formula where I add up the vAggMeasure only if CC_Quartile is equal to either 1,2,3 or 4. This is the formula I have so far:

Sum(TOTAL <[ProjectName]> aggr({<CC_Quartile='={1,2,3,4}'>} $(vAggMeasure), [ProjectName], [FundName]))

However, the total which is computed using this formula includes instances where 'CC_Quartile' is a blank ('-' in QS). 

Does anyone know how I can fix this?

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
Ksrinivasan
Specialist
Specialist

hi,

 

Sum(TOTAL <[ProjectName]> aggr({<CC_Quartile='={1,2,3,4}'>} $(vAggMeasure), [ProjectName], [FundName]))

 

try this
(Sum({$<CC_Quartile = {'1','2','3','4'}>} Total AggMeasure))

 

ksrinivasan.

View solution in original post

4 Replies
Lisa_P
Employee
Employee

Try this:

Sum(TOTAL <[ProjectName]> aggr({<CC_Quartile={1,2,3,4}>} $(vAggMeasure), [ProjectName], [FundName]))

FinancialDataScientist
Contributor II
Contributor II
Author

Thanks for coming back so quickly. Unfortunately, I’ve tried this formula and am still having the same issue.
Ksrinivasan
Specialist
Specialist

hi,

 

Sum(TOTAL <[ProjectName]> aggr({<CC_Quartile='={1,2,3,4}'>} $(vAggMeasure), [ProjectName], [FundName]))

 

try this
(Sum({$<CC_Quartile = {'1','2','3','4'}>} Total AggMeasure))

 

ksrinivasan.

FinancialDataScientist
Contributor II
Contributor II
Author

Thanks all.