Forum Discussion
Is there an API to get possible filter values (for buiding custom filter UI)?
- 4 years ago
Hi Lumpie,
AMO-TOM gives you full access to the tabular object model, including the table names, column names & data types.
Alternatively, you can use AMO-TOM to query DMVs (e.g. select * from $SYSTEM.TMSCHEMA_TABLES).
In the Power BI APIs front, you can use the scanner APIs.
However, those are probably not suited for your use case (asynchronous, the metadata may not be up to date etc.).
Hi xhan,
1. Power BI uses "Analysis Services" as its analytical engine. AMO-TOM enables you to connect to an Analysis Services instance using its XMLA endpoint. If you are using Power BI Premium, you can allow access to the XMLA endpoint and use AMO-TOM. Analysis Services is also included as part of SQL Server (SSAS = SQL Server Analysis Services), but that should not concern you.
2. This functionality is not exposed as part of the documented Power BI REST APIs.
3. AFAIK, the scanner APIs do not return metadata at the page or visual granularity. If you set both tenant settings in the doc & performed a refresh, You should be able to get table/column/measure. See this doc regarding limitations.
This is an area in which Power BI lacks functionality. There are APIs to get some details for the pages & dashboards. See
get-pages-in-group
get-dashboards-in-group
get-tiles-in-group
You also have the option to get the structure directly from PBIX files by using 3-party (unsupported) tools like PBI Tools
Those parse the pages & visuals metadata. See, for example here (19:00).
If you need to export reports to PBIX files you can use
export-report-in-group