cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Wessel Frequent Visitor
Frequent Visitor

Visualisation query on imported database

Hello,

 

I'm currently working with an imported MySQL database in Power BI Desktop.

While working and learning about Power BI and having experience with more hard-coded BI solutions, I'm wondering how Power BI builds up a query for showing and updating visuals.

On YouTube, I've found this video that shows what queries Power BI sends through DirectQuery when updating a visual using a slicer. Can anyone explain to me if Power BI does the same or a similar thing when using an imported database? If so, how can I test this or show the actual query being used?

I'm trying to understand how Power BI builds visualisations amazingly fast on a complex relational database and how it handles table relationships in this query.

 

Help me out!

 

Kind regards,

 

Wessel.

1 ACCEPTED SOLUTION

Accepted Solutions
Nolock Member
Member

Re: Visualisation query on imported database

Hi @Wessel,

 

aha, I see.

Do you know the DAX Studio (https://daxstudio.org/)?

It can visualize how a DAX query is evaluated: https://daxstudio.org/documentation/features/query-plan-trace/

 

EDIT:

And a link on Youtube how to trace a DAX query: https://www.youtube.com/watch?v=fAwvJa3Xkso

4 REPLIES 4
Nolock Member
Member

Re: Visualisation query on imported database

Hi @Wessel,

 

yes, you can see the actual query sent to a DB (if supported by PowerBI). The functionality is called query folding. You can see the query in the PowerQuery Editor, when you right click on a step and choose View Native Query. For more info search for query folding or check out this article: http://blog.pragmaticworks.com/power-bi-checking-query-folding-with-view-native-query

There is also another option, you can track all your queries on the DB side.

Wessel Frequent Visitor
Frequent Visitor

Re: Visualisation query on imported database

Hi @Nolock thanks for your reply!

 

First of all, you are absolutely right! I've found this feature myself earlier, but it's not really what I meant.

You see, query folding occurs when I edit my query in Power Query, not when I create or filter a visualisation in my report.

 

I've imported a MySQL database into my report, which means it's not sending any query's back to my database after I apply the query's in Power Query. (Apart from refreshing my data of course, which only repeats the Power Queries).

 

I'm kind of looking for the "view native query" functionality at my report visuals or any other way to find out what's happening in the background.

 

Do you see what I mean?

 

~ Wessel

Nolock Member
Member

Re: Visualisation query on imported database

Hi @Wessel,

 

aha, I see.

Do you know the DAX Studio (https://daxstudio.org/)?

It can visualize how a DAX query is evaluated: https://daxstudio.org/documentation/features/query-plan-trace/

 

EDIT:

And a link on Youtube how to trace a DAX query: https://www.youtube.com/watch?v=fAwvJa3Xkso

Wessel Frequent Visitor
Frequent Visitor

Re: Visualisation query on imported database

This is exactly what I needed!

It helped me to understand how DAX is applied on querying results. Unfortunately DAX is not open-source, so I can't really discover how these functions actually operate.