3 Replies Latest reply on Sep 7, 2016 11:21 AM by Stephen Rizzo

# Calculation question

This calculation

IF [Channel] = "Business" AND [Title] = "SM" THEN [Booking Target] END

result is the last value in the sum.

the records it should be summing are

15,599

15,599

9,300

The result is 9,300

• ###### 1. Re: Calculation question

Hi Austen Robinson : Could you please elaborate . Do you mean that [Booking Target]  is a measure field which has the values :

15,599

15,599

9,300

?

If yes the formula should be IF [Channel] = "Business" AND [Title] = "SM" THEN sum([Booking Target]) END

Let me know if this is what you are looking for ?

Regards,

Rashmi

1 of 1 people found this helpful
• ###### 2. Re: Calculation question

tried your calculation and get an error:

cannot mix aggregate and non aggregate comparisons or results in IF expressions

yes [Booking Target] is a measure.

• ###### 3. Re: Calculation question

It depends a bit what you are trying to do with this calculated field. You can probably get what you want with a tweaked version of the formula posted by Rashmi:

IF ATTR([Channel]) = "Business" AND ATTR([Title]) = "SM" THEN SUM([Booking Target]) END