Hi
I have a PowerApp which has multiple SP lists as data sources. One of the SP lists is considered the main list, and the other is considered the 'child' list.
In a Gallery on one of the app screens, I need to only show records from the main list where there is at least one item with the same ID in the child list, and in addition the filter should restrict to child list items where the 'Month' value is the current month, and where the 'Year' value is the current financial year.
Here is a sample of the child SP list dataset:

I have set up a ClearCollect in the OnVisible screen property with the following code:
ClearCollect(MonthValues2,Filter('Corporate WIP System - Month values',Month in Text(Today(),"mmmm"),
If("January" exactin Text(Today(),"mmmm") Or "February" exactin Text(Today(),"mmmm") Or "March" exactin Text(Today(),"mmmm"),
EndsWith(Year,Right(Today(),4)),
StartsWith(Year,Right(Today(),4)))))
The logic behind the filter above is that if the current month is January, February or March, only items where the current year (ie today) is at the end of the 'Year' value of the child list item (eg '2023-2024') are included, whereas if the current month is April onwards, items where the current year is at the start of the 'Year' value are included.
I then pass the output of this ClearCollect into the gallery's Items property. It is not working as expected.
Any help or advice appreciated. I'm wondering if embedding an If statement into the Filter in this way is the issue, and whether conceptually there is a different/better way of achieving this.
Thanks, Tom