Skip to main content
cancel
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.

Reply
pkoel-asb
Helper V
Helper V

How do I query the contents of a Power BI Visual - very new

Hello,

 

I have tree table visualizations based on three querys. The visualizations contain the same column names, but come from three different data sources (Sharepoint, SQL Server, and Excel), hence the three different querys. I now want to test to see if values in the Sharepoint table (id field) are in the SQL Sever table visualization (id Field when the amount field is less than 6) and then ido the same task against the Excel tabel visualization. In essence, I want to select the values from the SharePoint table visualization when the corresponding field value is also in the SQL Server field.

 

Select *

from SharePoint visualization

where id in (

                    select id

                    from SQL Server visualization

                     where amount < 6)

 

Any ideas on how to do this?

 

Sincerely,

 

Peter

1 ACCEPTED SOLUTION
v-joesh-msft
Solution Sage
Solution Sage

Hi @pkoel-asb ,

As mentioned by @trebgatte , after you connect the data, you can use Merge Queries to achieve the results you want:

1.PNG2.PNG3.PNG

Here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EUIQi-Dh7sNEvu--j6...

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-joesh-msft
Solution Sage
Solution Sage

Hi @pkoel-asb ,

As mentioned by @trebgatte , after you connect the data, you can use Merge Queries to achieve the results you want:

1.PNG2.PNG3.PNG

Here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EUIQi-Dh7sNEvu--j6...

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

You have to do this much earlier in the process since Visuals only display the final results.

 

In the Power Query Editor, (Transform Data on the new Ribbon), you can connect and query each source individually.

  • I'd filter your SQL Dataset by Amount <6 first.
  • Click on the right column dropdown and set a number filter < 6
  • Then click on the SharePoint dataset
  • From the SharePoint List, use the Merge button on the Home tab to join this data with the filtered SQL query to get the desired results.
  • Once joined, click the resulting column header that contains yellow text
  • Click the double headed arrow in the upper right corner of the column header to pick the columns to retrieve.

 

I hope this helps!

--Treb

 

Check out my Power BI blog posts at https://marqueeinsights.com

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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