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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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

v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors