@Datenshi
Yes, you are right, NOT is also not delegable for SharePoint data source.
Then to keep the query delegable, you may need to only get those records which match, even it means stating all possible matches.
So instead of
Active = Not("Yes")
you can use:
//example
Active = "No"
I am not sure of another way.
You can also try the below to bypass the limit and see if it works. I don't recommend ForAll on the whole data source, but if you have to use it and it works and you notice no issue:
(Distinct(ForAll('PersonnelList-', Active = Not("Yes")),'EMPLOYEE NAME').
Besides the above, you should look at other approaches such as pulling the data source records in small batches at a time, combining them into a Collection (note that with respect to Collections and variables, while the Collection itself may contain more total Records than the delegation limit, the actual single calls to Set, Collect, and ClearCollect themselves are subject to the delegation limit and these do not give any delegation warning, so make sure that each time these are called, if you use them, the batch they are called with is within the delegation limit each time).
The approach for doing this in batches is more complex though, so if you can use ForAll for now, even if it is discouraged to do so generally, and see if it works for you and if it does so without you noticing much issue.
Besides the above, the only other way is to make sure to do whatever you possibly can to make the query delegable - that means even rethinking the whole strategy and rewriting the formula to only match for all possible column values in the Filter (as tedious as that may be, but if it works correctly, this would be one of the preferred solutions).
Another solution is to change the whole data source to one that NOT is supported in. For example, you can try to use Dataverse, . This would be preferred to using ForAll in SharePoint, and it may be the most preferred solution for you if you know you must use the Not function- however, I am aware this solution may not be reasonable as it could take considerable time to setup the whole data again in a new data source and migrate the whole thing there too. Considering that, if ForAll works, and it works quickly, and you don't notice any issue, any theoretical internal performance issues could be ignored (for now - because although you may have to face these issues eventually, depending on the scenario over time - you can't be sure you have to worry about it, so you may end up not even ever having to worry about it in your case), in favor of not having to switch the data source, and not having to take considerable time avoiding to use the Not function or trying to use a complex approach to split it up in batches with complex formulas, etc.
See if it helps @Datenshi