Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
486 views
in Technique[技术] by (71.8m points)

powershell - Getting Power BI Measures and Columns via REST API

I intend to get list Power BI Measures and Columns from a Power BI dashboard published in Power BI workspace. Is it possible to get this via Power BI REST API or PowerShell?

What I have tried so far:

  1. Downloaded the PBIX and saved the same as a template file
  2. I then programmatically got the measures and columns from the template file(saved as zip)

Is there a simple approach for this? I am aware of DAX studio but I am looking for a solution or an approach that can directly connect to workspace and get the details.

question from:https://stackoverflow.com/questions/65932916/getting-power-bi-measures-and-columns-via-rest-api

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The Power BI API returns admin info on the state of a dataset, but not the data structure.

If the dataset is compatible and the XMLA endpoint for the workspace is open, you can connect to that and use it like you would an Analysis Services database, including getting the measures and columns. You can use any tool or custom code that implements the MSOLAP or AMODB libraries. DAX Studio is just one of these options. The url of a workspace will be powerbi://api.powerbi.com/v1.0/[tenant name]/[workspace name]


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...