Percentage of total some series

Hi,

I have the following data set:

month, cathegory, value
2023-01-01, A, 30
2023-01-01, B, 20
2023-01-01, C, 40
2023-01-01, D, 100

2023-02-01, A, 30
2023-02-01, B, 150
2023-02-01, C, 200
2023-02-01, D, 300

2023-03-01, A, 220
2023-03-01, B, 100
2023-03-01, C, 100
2023-03-01, D, 600

Now I want to display on a line chart the percentage of total only for some categories,
say would like to have a plot with two line one for A and another for B but for each month they should display the percentage of total for a given month?

I know how to do it if you want to display all categories:

percentageOfTotal (sum({value}, [{month}])

but is there a way to do it without creating a calculated field for each category?

or even more: if I would like to allow user to chose which categories to display?

Many thanks for your help

Hi,

This document may help you :slight_smile:

Regards,
Naveed Ali