I am trying to create a flow for a SharePoint List where each entry has an ID based on the Year, Week, and an incrementing number which is 1 bigger than the number of other rows that share the same Year and Week. I.E. entries in 2023 week 1 would be 2023-01-0001, then 2023-01-0002, then for the next week the counter would start again so it would be 2023-02-0001, then 2023-02-0002 etc.
I have created a column in the SharePoint list which extracts the Year and Week from the created date in the format Year-Week.

Using this column I have tried to make a flow as follows:

So my thinking behind it is that it gets all the items, filters for only the items where the Year-Week column matches the new entry, counts how many rows there are in this filtered array, and then puts the Year-Week number followed by the count +1 in a new column.
The parts I am struggling with is the Filter and the Length part.
For the Filter part, am I correct in thinking I would do

Where the first Year-Week is from "When an item is created", and the second one is from "Get items".
Then I'm not sure how to write the formula for the Compose part for it to count the number of rows from the Filtered Array, and +1 to it. I think I'd use the 'length' expression but don't know how to specify to use the results of the Filter section.
This is my first flow so am very lost!
Any help would be appreciated, thanks 😁