9 Replies Latest reply on May 11, 2018 6:22 AM by Fernando Abrão

# Count/Sum condition

Hello,

I have a calculated field with this conditions:

ELSEIF AVG([DISPONIBILIDADE-VALOR]) >= 80 THEN 5
END

and the result is:

Is there any way to count only for value = 5? In this case will be 2. The result in screen is showing 2.

• ###### 1. Re: Count/Sum condition

try if AVG([DISPONIBILIDADE-VALOR]) = 5 then 'Y' else 'N' end

use this into filter, and select only Y

• ###### 2. Re: Count/Sum condition

Hi, Fernando

Can you provide a sample workbook?

ZZ

• ###### 3. Re: Count/Sum condition

Hello, I cant do this because [DISPONIBILIDADE-VALOR] is percent, the if calculated results 5.

• ###### 4. Re: Count/Sum condition

Hi Fernando,

You need to amend your calculation like Shesil suggested. You could do it in many ways. Below is just one approach;

[Original Calculated Field]

ELSEIF AVG([DISPONIBILIDADE-VALOR]) >= 80 THEN 5

END

[Count Filter]

[Original Calculated Field] = 5

This will be a Boolean field. Put it on the filter shelf and set it to True.

• ###### 5. Re: Count/Sum condition

I´m trying to count how many '1' and show the result in sheet.

Regards

• ###### 6. Re: Count/Sum condition

Do you want to count how many Nome Links with [Total] = 1?

I yes, then edit your [Final] calculation to;

IF [TOTAL] = 1 THEN 1 ELSE 0 END

Ossai

• ###### 7. Re: Count/Sum condition

I've just looked at your data source and discovered you have lots of rows but no unique identifiers. It appears you didn't include some fields in the sample dataset. What is the unique identifier for each row in your database?

• ###### 8. Re: Count/Sum condition

Hi, Fernando

Please find my solution attached as well as screenshot below for reference

Hope this helps

ZZ