How to count sum of characters in dataview


What I’m trying to do

I need the main page of the manual to display information about its sections, there should be information about the number of characters in these articles in total

Things I have tried

The problem is not in the main page, but in the articles, I need to put the value of the amount in a separate variable, which the main page will then take

i tried to uderstand answer from this post, but there were too many small details that require immersion, although the task seems to be just to sum up the values of the table, there would be an implementation through pandas, it would not be difficult, but instead there is a stripped-down SQL, which I already understand poorly

there my dataview and code of it:

how should I change the code so that it counts the sum of the article characters into a variable characters?

thanks in advance

To display the total numbers you could use:

TABLE WITHOUT ID length(rows) as "Files", sum(rows.file.size) as "Characters"
FROM #somewhere 

I don’t have a cyrillic keyboard to I couldn’t repeat that tag. :smiley:

If you need to do this in another view related to section you might use something like the following, given that each section has the different articles within their own folder:

TABLE length(rows) as "Files", sum(rows.file.size) as "Characters"
FROM #somewhere 
GROUP BY file.folder

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