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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to execute a DAX query on a Power BI Service dataset via C#/REST ?

Hi All,

I am exploring if the following scenario is currently supported.

 

Background

  1. I have a dataset published to a Power BI Workspace
  2. The dataset is configured to work in Import mode.
  3. License is professional

Scenario

  1. Execute DAX queries on this dataset via REST API or some C# wrapper.
  2. The information retrieved could be used for some back end business application logic. E.g. Send alerts to customers to notify about some business conditions, Display data on a custom web page in a custom way

 

Thanks,

Sau

 

 

4 REPLIES 4
Gentiana
Microsoft Employee
Microsoft Employee

You are now able to do this. Check out this public REST API: Datasets - Execute Queries - REST API (Power BI Power BI REST APIs) | Microsoft Docs

OMG

Anonymous
Not applicable

HI @Anonymous,

As ibarrau said, I don't think it is possible to execute the Dax formula with the rest API. Dax expression works on the AS tabular data model, you can't push these formulas from external.

In my opinion, I'd like to suggest you try to use power bi Automate to trace the dataset records and send alert messages based on some conditions.

Integrate data alerts with Power Automate 
Regards,

Xiaoxin Sheng

ibarrau
Super User
Super User

Hi. I don't think you can do that with a Pro license. The only way to query a dataset in Power Bi Service is if it is in a Premium Capacity Worskpace that will generate an endpoint. You can connect to it as if it was an Azure Analysis Service. I don't know about C# to help with the code, but I know that it's the only way it will allow you to query that data.

Hope this helps,


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

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.