Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Summarize wit filters by sum

Hi all

from a DB, here the link, I made this summarize funcion:

Pick_PKuph = summarize(filter(PICK, PICK[TIPO]= "PK"),PICK[ORA], PICK[GIORNO], "tot", sum(PICK[TOTALE]), "Prel", sum(PICK[PRELEVATO]), "ops nr", DISTINCTCOUNT(PICK[MATRICOLA]), "Contenitori", count(PICK[CONTENITORE]))

 

I need to filter the summarize according the total units achived

- by each MATRICOLA(distinct)

- for each hour

- when the sum of TOTAL is higher than 8

 

For example, if I make a easy excel pivot table it results:

* On 11/02, filter TIPO=PK, ORA=7 --> Ops nr=15, and 487 units picked

BUT I would to count and to sum, only the sum of total units per ORA, per MATRICOLA higher than 8. So I should have:

* Ops nr = 13, Units picked= 470

 

Moreover, according this logic, I need to extract thise formula:  pieces/ops nr

Do u know if exists a way to achive it?

Thanks a lot in advance

Andrea

2 Replies

  • Anonymous , You can create a meausre like this on this new table

     

    countx(filter(Pick_PKuph , Pick_PKuph[ops nr] >=8),PICK[ORA])

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amit

      It doesn't give the result requested.

      Maybe I don't use it at the right way. 

      Where should I  write it?