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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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