Hello everybody!
I want to get the highest/largest ID in a SharePoint library (the most recent item submitted) and return it to PowerApps (in order to use it as a "counter").
Is it possible? I am trying with formulas such as "Max" or "Sort" but every time this error appears:

It says that "Delegation problem” because it takes to many items.
I just want the last Item created ID and return it to Power Apps (so I don't need the formula to run through all the lines...).
Any solution will be usefull! Thanks!