Forum Discussion

iBusinessBI's avatar
iBusinessBI
Kudo Collector
3 years ago
Solved

Run DAX Query against Dataset - in Dataflow?

Can we run a DAX Query against a Dataset using a Dataflow (not Power Automate)?

Is should be straightforward - if I want to select a data using a DAX query from a Power BI Dataset, I should be able to do it easily using Power Query / Dataflow.
I feel it's rather strange that I need to go to another service (Power Automate) to do such a basic thing.
It should be integrated into Power BI environment.

Is it something on the to-do list?

Am I missing something?

  • So I did find a solution!

    It doesn't require Premium and it also doesn't use REST API either.

    I used OLE DB connection with DAX query.

    I copied the connection string from Analyze in Excel when I did a drill-through action.

    It also runs as scheduled refresh in the Service via Gateway.

    So solved!

2 Replies

  • Hey iBusinessBI ,

     

    basically you can use two approaches:

    • XMLA endpoint
      you can use the XMLA endpoint of a Power BI workspace (backed by Power BI Premium or Premium Per User) to connect to Power BI dataset to run a DAX query by using the Azure Analysis Services database connector
    • Custom Connector/Rest API
      Create a custom connector that is utilizing Power BI's Rest API interface to issue a DAX query: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries

    Hopefully, this provides some idea to tackle your challenge.

    Regards,

    Tom

  • So I did find a solution!

    It doesn't require Premium and it also doesn't use REST API either.

    I used OLE DB connection with DAX query.

    I copied the connection string from Analyze in Excel when I did a drill-through action.

    It also runs as scheduled refresh in the Service via Gateway.

    So solved!