Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Output DAX Evaluate results to a SQL Server Database table

Happy new year everyone!

 

So I have a DAX query stripped from PBI report that I have re-built in SSAS. But since my application doesnt like DAX, I thought pushing the set of DAX results to a database server table would be the ideal solution for my application to read.

How do I output the contents of a DAX query to a SQL Server database table? And if possible truncate the contents of the table before each run?

 

I'm using SQL Server 2016 if that helps.

  • Anonymous's avatar
    Anonymous
    6 years ago

    Ok so that does make sense.

     

    Only issue is how do you format such a query in sql server? how can I refer to an SSAS server instance/model to point the query at?

     

    create view  vw.DAX

    as

    Evaluate( xyz )

     

    Thanks, your helps been very appreciated thus far parry2k 

7 Replies

  • Anonymous not sure fully what you mean by pushing DAX result out. You can sure  DAX Studio tool and run DAX expression there and it will show you the output, although I'm not sure if there is option to export the result set or not.

     

    But in general this approach doesn't seems right.

    • Anonymous's avatar
      Anonymous
      Not applicable

      thanks for the reply parry2k 

       

      So yes what I need is the results of that DAX query to be exported/pushed into a sql table. Is there not a way of pushing the results into a sql temp table or any table in a database?

       

      Reson I need to do it this way is my software app can't connect to SSAS to retrieve the results but can connect to a SQL server table to read the data. The idea is to output the aggregated results of DAX into a SQL Server table

      • parry2k's avatar
        parry2k
        Super User

        Anonymous hmm still this doesn't seems to be the solution, I'm sure SSAS has some data source that should be your source for your app, and you shuld be converting DAX into Views and use that in yrou APP, rather exporting DAX to SQL Server. This all doesn't make sense even though you want to do it, just a suggestion and my feedback.