Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a table like this...with much more rows.
name | surname | dateofbirth | result | DATA VALIDAZIONE |
PROVA | PROVA1 | 16/12/1938 | POSITIVO | 09/04/2020 |
PROVA | PROVA2 | 05/06/1941 | POSITIVO | 10/04/2020 |
PROVA | PROVA3 | 19/10/1930 | POSITIVO | 11/04/2020 |
PROVA | PROVA1 | 16/12/1938 | POSITIVO | 12/04/2020 |
PROVA | PROVA2 | 05/06/1941 | NON RILEVATO | 13/04/2020 |
PROVA | PROVA1 | 16/12/1938 | NON RILEVATO | 14/04/2020 |
In different dashboards i want calculate:
1) how many times a specific person (identified by nam+surname+dateofbith) have switched theri result (i.e. PROVA PROVA1 have switched once from POSITIVO to NON RILEVATO....)
2) count only the first occurence of a specific result for each person (i.e. PROVA PROVA1 have two result POSITIVO but i want count only the first)
Please help me.
Thx
Are you looking for this?
tab1:
LOAD name, surname, dateofbirth, Count(DISTINCT result) As Count_Result
Group By name, surname, dateofbirth
;
LOAD * INLINE [
name, surname, dateofbirth, result, DATA VALIDAZIONE
PROVA, PROVA1, 16/12/1938, POSITIVO, 09/04/2020
PROVA, PROVA2, 05/06/1941, POSITIVO, 10/04/2020
PROVA, PROVA3, 19/10/1930, POSITIVO, 11/04/2020
PROVA, PROVA1, 16/12/1938, POSITIVO, 12/04/2020
PROVA, PROVA2, 05/06/1941, NON RILEVATO, 13/04/2020
PROVA, PROVA1, 16/12/1938, NON RILEVATO, 14/04/2020
];
If Saran's post got you what you needed, we would appreciate it if you would return to the thread and use the Accept as Solution button on their post to give them credit for the assistance and to let other Members know that worked. If you did something different, please consider posting what you did and then mark that post.
Regards,
Brett