microsoft / powerbi-powershell

PowerShell community for Microsoft PowerBI. Here you will find resources and source for PowerShell modules targeting PowerBI.
MIT License
348 stars 121 forks source link

Get-PowerBIReport feature: add PageCount property? (And similar for dashboards) #407

Open philosophicles opened 4 months ago

philosophicles commented 4 months ago

Feature request: could the output object from Get-PowerBIReport include an additional int property storing the number of pages the report contains?

The REST API exposes an endpoint listing pages within one report.

GET https://api.powerbi.com/v1.0/myorg/reports/{reportId}/pages

It would be useful to have this additional property as page count is a reasonable proxy for complexity of a report, and might correlate to effort of some development / maintenance tasks, or be considered a bad smell if the number is very high.

Similarly, Get-PowerBIDashboard results could have an int property for the number of tiles on the dashboard.

If performance is a concern given the additional API call per report/dashboard, this could be included by default only when there are fewer than X reports/dashboards in scope (X = 10 or 20 perhaps?). With an additional switch to include this metric for larger result sets.