Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with expresion to count(if otherexpresion='Yes')

Hello everiboy! I need count rows that the signal is 'SI' in a pivot table. The field Semaforo is other expresion is not a dimension. There is my problem.

I attached the file.  An example:

NroPedido  Semaforo      IC

1                    SI                      3

2                    SI                      3

3                    NO                    3

4                    SI                      3

The result for all rows will be three for the expresion IC.

Please I need resolve this problem for my job as soon as posible.

Thank you! so much!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

This expression for IC looks like working.  You may not like the performance...

count (total distinct

aggr(

if(

count (DISTINCT [Nro. Entrega])

>

AVG(Total<Mes> Aggr(count (DISTINCT [Nro. Entrega]), [Nro. Pedido SAP]))

-

(1 * Stdev(Total <Mes> Aggr(count (DISTINCT [Nro. Entrega]), [Nro. Pedido SAP])))

AND

count (DISTINCT [Nro. Entrega])

<

AVG(Total<Mes> Aggr(count (DISTINCT [Nro. Entrega]), [Nro. Pedido SAP]))

+

(1 * Stdev(Total<Mes> Aggr(count (DISTINCT [Nro. Entrega]), [Nro. Pedido SAP])))

, NAM&KAM&NODO&DESNODO&Mes&[Nro. Pedido SAP])

,[Nro. Pedido SAP]))

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Please upload a smaller example of your application, preferably below 1 MB. 

Anonymous
Not applicable
Author

Well, I think there are no answers because nobody downloaded the 47.7 MB file.

Without looking at the file, the answer is:
count(<{Semaforo={'SI'}}> NroPedido)

Not applicable
Author

Now I attached smaller file.

Anonymous
Not applicable
Author

This expression for IC looks like working.  You may not like the performance...

count (total distinct

aggr(

if(

count (DISTINCT [Nro. Entrega])

>

AVG(Total<Mes> Aggr(count (DISTINCT [Nro. Entrega]), [Nro. Pedido SAP]))

-

(1 * Stdev(Total <Mes> Aggr(count (DISTINCT [Nro. Entrega]), [Nro. Pedido SAP])))

AND

count (DISTINCT [Nro. Entrega])

<

AVG(Total<Mes> Aggr(count (DISTINCT [Nro. Entrega]), [Nro. Pedido SAP]))

+

(1 * Stdev(Total<Mes> Aggr(count (DISTINCT [Nro. Entrega]), [Nro. Pedido SAP])))

, NAM&KAM&NODO&DESNODO&Mes&[Nro. Pedido SAP])

,[Nro. Pedido SAP]))

Not applicable
Author

It worked. Thank you so much!!