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
Anonymous
Not applicable

How to pass filters in Report Builder before retrieving data from database

Hi!

 

I am trying to create a report in Power BI Report Builder. The query that I have put in the Dataset Properties is supposed to call a few columns from the database but holds no filter (where clause) there. I have added parameters that act as filters for the dataset but the reduce the amount of data only after fetching from the database. But since the data being fetched is huge (90 million records), PBI gives my "Out of Memory" error and is unable to present me the report.

 

Is there any way for me to pass the filter values with the query that I pass and bring only that much data as I require at the time? Instead of PBI trying to bring data from DB and then applying filter values?

4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

Have you tried using top sql statement here?

vjaneygmsft_0-1624961132443.png

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi! Thank you for replying. I tried that approach, however, I am getting the following error:

Rida_Quraishi_0-1624619500886.png

 

This comes after I have put the parameter value so, I know that PBI is accepting the call to parameter. It's just not able to hit the database with it I suppose.

Anonymous
Not applicable

In case you need more info, I am using Apache Hive as my database (connecting through ODBC connection). I think '@' works with SQL Server or Oracle database but not with Hive.

Do you know what would work with Hive?

bradsy
Employee
Employee

You can add a query parameter via the where clause. Take a look at section 3 of this article. https://docs.microsoft.com/en-us/sql/reporting-services/tutorial-add-a-parameter-to-your-report-repo...

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.