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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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)

Share with Power BI Enthusiasts: 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)

Share with Power BI Enthusiasts: 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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors