5 Replies Latest reply: May 2, 2016 7:40 AM by Maximiliano Carena

# HELP! How to do a function that contains Count, Sum, two distinct fields

Hello dear, I am wanting to build a KPI to count (count) Documents (Field DOC_CLI) Limited (distinct) when the sum of other Campo (Field VALO) is greater than zero 0.

How do I get the function adding the KPI tell me these SPDs when the sum of VALO is greater than zero?

FIELD = DOC-CLI

FIELD = VALO (contains numbers)

Hola estimados, estoy queriendo armar una KPI que cuente (count) de Documentos (DOC_CLI) Únicos (distinct) cuando la suma de otro Campo (VALO) sea mayor que Cero 0.

¿Cómo hago para que agregando en la Función de la KPI me cuente estos Documentos Únicos cuando la suma de VALO sea mayor a Cero?

CAMPO= DOC-CLI

CAMPO= VALO (contiene números)

• ###### Re: HELP! How to do a function that contains Count, Sum, two distinct fields

I am not really sure I follow your request. Would you be able to guide us by sharing few lines of sample data and expected output?

• ###### Re: HELP! How to do a function that contains Count, Sum, two distinct fields

Hi Sunny T!, thanks for your interest,here you step in detail what I want to do, ask me to make it clearer if I still do not understand well

• ###### Re: HELP! How to do a function that contains Count, Sum, two distinct fields

If you want to see this in a straight table you can use DOC_CLI as your dimension and If(Sum(VALO) > 0, Sum(VALO)) as your expression.

On the other hand, if you wish to see this in a text box object, you can try this

Concat(DISTINCT Aggr(If(Sum(VALO) > 0, DOC_CLI), DOC_CLI), Chr(10))

The above will show a list of DOC_CLI (on a new row) where Sum(VALO) > 0

• ###### Re: HELP! How to do a function that contains Count, Sum, two distinct fields

Sunny, I can solve as follows: Count (DISTINCT Aggr (If (Sum (VALO)> 0, DOC_CLI), DOC_CLI))