Compter un nombre de valeur (dataview) - Count value

Hello !
J’ai une demande qui va vous paraître simple mais je n’arrive pas à l’appliquer sur mon vault.

J’ai des tâches en lien avec des clients et des projets
Avec Dataview, j’arrive à sortir toutes les tâches.
Puis j’arrive regrouper par client

J’aimerai enfin que dans la ligne de chaque client, ca me comptabilise le nombre de tâche que j’ai pour chaque client
Dans mon exemple : 4 pour CCI GE, et 1 pour CAUE13

Je vous ajoute la version édition et la version aperçu de ce que j’ai

J’ai tenté d’utiliser sum() ou count() mais je dois mal le faire, car ca me met une erreur :frowning:

I have a request that will seem simple to you but I can’t seem to apply it to my vault.

I have tasks related to clients and projects
With Dataview, I can get all the tasks.
Then I can group them by client

Finally, I would like to see the number of tasks I have for each client in the line for each client
In my example: 4 for CCI GE, and 1 for CAUE13

I add you the edition version and the preview version of what I have

I tried to use sum() or count() but I must be doing it wrong, because it gives me an error :frowning:

Translated with DeepL Translate: The world's most accurate translator (free version)

Something like this?

TABLE rows.project AS "Projects", rows.status AS "Status", rows.type AS "Type", length( AS Total
FROM #task AND -"Templates"
FLATTEN client
GROUP BY client
1 Like

Almost !
How can I juste have somthing like :
CAUE 13 | 1
CCI GE | 3

Without all rows of files/tasks

So two rows instead of 4 currently ?

I understand you mix my tables in one, and it could be a very good idea.
But if I had a lot of files/task for a client, it wouldn’t be clearly to read

But thanks for your answer.
It’s near to bo perfect

I proposed a table because in your image (second table and your queries attempts with group/flatten) it seemed that you want control all the other information. :slight_smile:

But if only a list with the total you can use a LIST not a TABLE


LIST length(
FROM #task AND -"Templates"
FLATTEN client
GROUP BY client

Ou celui-là:

LIST WITHOUT ID client + " | " + length(
FROM #task AND -"Templates"
FLATTEN client
GROUP BY client

1 Like

Right !
Yes, that’s because i’m noob so I wrote like I saw somewhere but formule doesn’t match with my wishes :smiley:

Thanks a lot, I think you answer to my question :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.