Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2023 08:09 AM
@KVNARK . :
One potential solution would be to use an open-source MDX library for Python that can connect to SSAS, such as OLAP-XMLA for Python. This library can be used to execute MDX queries against a SSAS server, including Power BI datasets.
Here's an example code snippet to get you started:
from olapxmla.xmla import XMLAConnection
conn = XMLAConnection('http://<server_name>/powerbi/msmdpump.dll')
catalog = conn.Catalogs['<catalog_name>']
cube = catalog.Cubes['<cube_name>']
result = cube.execute("SELECT ... FROM ...")Note that you will need to replace <server_name>, <catalog_name>, <cube_name>, and the MDX query with the appropriate values for your Power BI dataset.
Another option could be to use the Power BI API to extract data from the dataset, rather than connecting directly to the SSAS