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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Santhanam
Resolver I
Resolver I

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

Hi,

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

3 ACCEPTED SOLUTIONS
amitchandak
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)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Hi Amit,

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

View solution in original post

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

View solution in original post

4 REPLIES 4
Santhanam
Resolver I
Resolver I

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.

amitchandak
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)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.