I have a data set which contains opening and closing value for a particular end time, I have to show Max of closing value for a month and a date .
First measure is based on month :-For example, in below data set for month of 'Nov', Max of End time is 21:00:00.0000 for date '2019-10-30' and closing balance is 5676.43 , so for month of 'NOV' it should give '5676.43'
Second measure is based on Date :- If user selects Date as '2019-11-25', it should return max value of end time for this date that is '10687.71.
I have to show these values in a line chart with two dimensions:- Month and Date and above two measures.
So upon selection of Month and date it will display values.
See attached; I think I understand what you are trying to achieve
I think the problem you have is that you have data points (at least in the sample you have shared) that have the same timestamp; so, sorting them might result in getting the incorrect output (i.e. the wrong last entry)
Probably the best thing is to rely on the load order and possibly create a counter when the script is loaded to make the selection of he last data point easier
Have a look and let me know if this is in the right direction