Hi,

I am trying to build a visualization with an aggregate percentage, and I can't find a way to show the percentages.

Each document has three fields that are relevant to my visualization:

day : date

number_of_tokens : int

tokens_matched: list of strings

I'd like to have a table with one row per day, the sum of number_of_tokens for all documents on that day, and the percentage of tokens_matched out of the sum of number_of_tokens.

For example, for these 2 documents:

{day = 2017-12-25, number_of_tokens = 10, tokens_matched = ["a", "big", "cat"]}

{day = 2017-12-25, number_of_tokens = 5, tokens_matched = ["nice", "dog"]}

The table would look like:

2017-12-25, 15, 33.3%

I can't figure out how to get the percentage column, I can get the actual number (in this case 5) by summing the size of the lists, but I can't get it as a percentage of the total column.

Any help would be greatly appreciated!

Thanks