Filter bar gauge by latest available value of tag

Hello all,

I am trying to build a bar gauge where I group a count of parts by stations.
I group my data by Station_n and ShiftDate, and would like to return values only for the last ShiftDate.

Here, I should return Stations and values only for the last ShiftDate overall (20230605).

Do you know how I could do ?