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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

New Member

how to find the equivalent SQL query of a measure used in a power bi dataset


i have multiple datasets that I access, when it comes to matching the numbers between the power bi dataset and Synapse DB its always a pain to find the exact sql query that will give me a value that the power bi dataset would show for a specific measure.


earlier i was able to open a copy of power bi report in power bi desktop app and find the underlying query used to make a specific measure. currently im not able to find  the SQL query thats is used to make a measure in power bi.


note: when i click on a measure to find a underlrying query, it states direct query and doesnt show me the query

New Member

I have no clue on how to run the profiler, what options to choose etc.

if there is any video that shows how to do this , it would be really helpfull.


i did try to check in google but wasnt lucky enough get a solution that worked for me though.

Super User
Super User

@Santhanam , In the case of Direct query you can see SQL when you use performance analysis. I doubt that in the case of import mode.

Another way was to track SQL at the database end(again direct query)

SQL server profiler can be used for that( normally used with SQL server on back end)

Hi Amit,

Thanks for that insight, im gonna try that approach and will post my findings soon.

Hi @Santhanam ,


If the method he offers is feasible, please mark it as a solution so that more people with the same problem as you can find the answer quickly.


Best Regards

Community Support Team _ chenwu zhu

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

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


Fabric certifications survey

Certification feedback opportunity for the community.