Libreoffice Chart of balance sheet with multiple data for same day


I want to plot the time evolution of an account. The data consist of the following columns:
line number

The difficulty is that there might be several lines for one day (as there were sometimes several movements a day on the account) so only the last day-balance data pair has to be used for the plot.

I plotted a first chart in a quick and dirty manner : a scatter xy, no points but lines, so that the fact that there might be several data for the same day disappears. The data are overplotted on each other.
But this is not the proper way for a professional chart: I only need the last line of each day (the highest line number for a given day) to plot.

First question: How to achieve this ?

Second question:
The x-axis is the time axis, the data are in time format. Is there any way to get the tick marks show always the first day of a month ?