Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
aage-e
New Member

How to query PowerBI-data with c#

We have PowerBI-reports with calculations.

Based on these reports and measures we want to develop API's in c#

 

When the data is in a SSAS-cube, writing a DAX query to read data from a model is straight forward.

Is it possible to do a similar operation reading data from the PowerBI-model?

 

 

KR,

Aage.

1 REPLY 1
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi Aage,

 

The Power BI model isn't like the SSAS-Cube. SSAS Cube runs as a service while the Power BI cube is just a file. To be honest, I don't find a way to read data from the Power BI file directly. But we can read the data just like the SSAS model. Please refer to XML-structure and the additional snapshot.

How-to-query-Power-BI-data-with-c

About how to query data with C#, please refer to how-to-retrieve-data-from-ssas-cube-to-datatable-by-c. Since it isn't a service that can keep running, maybe the APIs aren't necessary.

 

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.