- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how can I get DAX query generated by power bi report?
Hi eb
I need to have a look at the full DAX query generated by power bi report (to get its data from underlying model).
Is there a 'show my DAX query' option in desktop?
If not is it hidden somewhere within the PBIX file?
I understand that looking at sql profiler will not cut it as DAX isnt registered over there but some kind of vertiPaq sql dialect??
TIA!
Rea
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, by that I guess you mean the query for measures and calculated columns? One way to do that is to click on each measure in PowerBI and the formula will appear in the formula pane above the canvas or table. The other way is to use DAX Studio and hook it up to your PowerBI Desktop pbix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wanted to generate a DAX query using a drag and drop interface and found SQL Serer Report Builder quite handy as you can generate the query using a drag and drop interface and then just copy the DAX and use it wherever you like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are wanting to see the DAX Query generated by a visual[s] in a report published on PBI Service that is based on a Power BI dataset, you can download the report from PBI Service and open it in the PBI Desktop and then use th Performance Analyzer to trace the DAX Query generated. hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check this one in GitHub, it works great.
https://github.com/JasonPad19/PowerBIScanner/blob/main/README.md
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually if you go to View-> Performance Analyzer (in power bi dekstop) you can start recording and copy the dax from your visual and recreate in power bi report builder. This will copy all your measures and values, so its better in my opinion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The visual way folow the numbers 😀:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @rpeleg
SQL Profiler will work and you should be able to extract the DAX. Do you have SQL Profiler installed and have you used it against a SQL Server Database engine?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeap got the profiler and worked with it.
I guess I got the wrong impression reading Performance Tuning of Tabular Models in SQL Server 2012 Analysis Services
especially around pages 26-28 where they show an example of profiling DAX that looks like some kind of strange SQL...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If we are looking at the same thing, I don't think that is DAX. When using Profiler, remove all your events apart from Query Begin and Query End. If the DAX is all you are after you won't need any other events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks a lot will check it out ASAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps I'm missing something here. Why not just open the Advanced Editor on the Query ribbon for each of your queries to see what they say?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks
I need DAX query generated by report not queries to model's data sources.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, by that I guess you mean the query for measures and calculated columns? One way to do that is to click on each measure in PowerBI and the formula will appear in the formula pane above the canvas or table. The other way is to use DAX Studio and hook it up to your PowerBI Desktop pbix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want the full EVALUATE() story.
Not just measures and formulas.
Would that be visible by the dax studio?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure what you mean by the "full Evaluate() story". I would suggest going to DAX Studio and reviewing how it works and what it shows to see if it answers what you're looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks a bunch!
DAX studio seems worth a try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wanted to generate a DAX query using a drag and drop interface and found SQL Serer Report Builder quite handy as you can generate the query using a drag and drop interface and then just copy the DAX and use it wherever you like.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
06-05-2023 05:09 AM | |||
01-23-2024 03:16 AM | |||
12-18-2023 10:46 PM | |||
05-02-2024 08:31 AM | |||
03-29-2024 02:35 AM |
User | Count |
---|---|
141 | |
110 | |
81 | |
61 | |
46 |