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
tap_ks
Regular Visitor

Get filtered data from SQL database

How can we limited data from a huge table reside in SQL Servere database?

 

We used WHERE clause in SQL Server. Do we have similar command in Power BI while pulling the required data?

 

Thanks in advance.

 

1 ACCEPTED SOLUTION

Hi @tap_ks,

 

In your scenario, you should be able to import all the tables one by one, by running corresponding native database queries against the same database each time. Smiley Happy

 

Regards

View solution in original post

5 REPLIES 5
v-ljerr-msft
Employee
Employee

Hi @tap_ks,

 

As mentioned by JoeCham above, you can directly run native database queries against the database using Power Query in your scenario. For more details about importing Data from Database using Native Database Query (Power Query), you can refer to this article. Smiley Happy

 

Regards

JoeChamp
Frequent Visitor

I'm working on the report, trying to add a measure.  The dashboard reference is to the data, the data set is the Audit Log data from the Office admin portal pulling dashboard views. 

 

I'm looking for a measure that will count the users that exceeded a count of 50 views on the dataset.  I have a metric that counts the views and displaying that fine on the report.  Now I'm looking for a way to count the number of users who have >50 views.  I can build a bar chart of the users and their views and filter that for >50, but I'm looking for a way to count them and show that count on a card visual.

JoeChamp
Frequent Visitor

You can use custom SQL including your where.  Just after choosing SQL server from Get Data, on the same screen as your server/database attributes, click the Advanced options and put your SQL into the SQL statement field.

 sql input.jpg

I need to pull from multiple tables e.g. from Customer, Orders, Items, Products tables separately. Then wants to buils a relationship.

 

How to do so?

 

Thanks in advance.

 

Hi @tap_ks,

 

In your scenario, you should be able to import all the tables one by one, by running corresponding native database queries against the same database each time. Smiley Happy

 

Regards

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.