Displaying data in charts doesnt work properly

Hi, I am making an application in which I store data from several objects. On the ‘details page’ I want to create a dashboard with some column charts and time series that shows the data of that specific object. However, my column chart stores (and stacks) the data from all the objects. When using the XPath constraint [MyFirstModule.CovidPatients_Hospital/MyFirstModule.Hospital/Name = '%CurrentObject%'], it doesn't show any data. Furthermore, I am unable to get the x-axis in a proper date form altough I use a Date attribute on the X-axis data attribute.  Anyone who can give me a quick explanation on how I can properly display data in charts?
1 answers

I believe the xpath  [MyFirstModule.CovidPatients_Hospital/MyFirstModule.Hospital/Name = '%CurrentObject%'] is incorrect as it seems to me it compares an objectid (CurrentObject) with an attribute value.

I think it should be something along the line of [MyFirstModule.CovidPatients_Hospital = '%CurrentObject%']

Does that work?