I've done more than 5,000, but I am not sure where the limit is, and it is not Power BI, it is what SP will return.
I would advise using the SharePoint.Contents connector instead of SharePoint.Files. Just create the connection as normal, then when you are looking at the file list, change the formula to use the SharePoint.Contents connector. it will now let you drill through to folders. As long as no folder has more than 5K files in it, you'll have no problem.
The downside is, you can only see one folder at a time, so if files are spread across folders, it is less ideal.
Did I answer your question? Mark my post as a solution!Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting