Show data from different years in a bar chart

Hello, my idea is the following: I am collecting information from an Odata in SAP and I have a persistent entity created to store that information in mendix and thus be able to feed the graph. One of the attributes that this entity has is 'Cpudt', of type datetime. That is the field that I take to show it in the graph and to be able to see how many records have been created according to the month and the year. This is the specific graph:     The problem I have is that there are several records entered in the year 2020 and 2019, so right now the graph only shows those of 2021. Could something be done in the graph so that according to the option you choose, the records of one year or another are shown? Something like a filter. That would be it, thank you very much for the help!
1 answers

I think I would create a filter outside the graph for this but you would need to change your domain model a little bit I think.

High level I think I would go into the direction of the attached domain model (star schema approach) with a non persisent selection helper entity. 

You can then add a drop down outside the chart to set the assocation from the selection helper to the year and refresh the data.