DEV Community

Hugo Queirós
Hugo Queirós

Posted on

DAX queries javascript

Hi, i am working on a project where they gave me some queries to extract data, but they are dax queries. I have already done the connection to the database but i would like to know if it is possible to do the query on javascript.
Thanks

Top comments (1)

Collapse
 
aarone4 profile image
Aaron Reese

Wow!
Probably not. DAX is used in Power BI and is equivalent to SQL. It is therefore really limited to the API layer. You may be able to prepare a DAX query in ES6 but I am not aware of any library that would allow you to execute it.
Maybe you need to go back and open up discussions on how front end works with data. You really need a URL endpoint that takes a request and returns structured data (normally JSON but XML is also acceptable)
GraphQL may solve the needs better than DAX.