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 use query by date not filter

Hello, 

 

I would like to only allow a certain amount of data to be queried into PowerBI. I don't want to load all of the data then filter. Can this be achieved through parameters or SQL? I have done it before, but not sure exactly how. Any suggestions would be great! Thank you!

2 ACCEPTED SOLUTIONS

Hi @Anonymous,

Any date fields stored in your data tables? If that is the case, you can turn on the 'advance' option and write t-sql query to filter on that field based on the max value from your table values.

Power Query SQL Server connector | Microsoft Docs

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

Anonymous
Not applicable

I used SQL on the source to only allow the first 30 days. Thanks for your help!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I used SQL on the source to only allow the first 30 days. Thanks for your help!

Pragati11
Super User
Super User

Hi @Anonymous ,

 

I think you can use query parameters in Power BI to achieve this.

See this blog: https://blog.crossjoin.co.uk/2020/05/24/limit-the-amount-of-data-you-work-with-in-power-bi-desktop-using-parameters-and-deployment-pipelines/

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Thank you! This blog only shows how to show the last X amount of rows. How do I show only the last 30 days? I want to query by date. Thank you again 🙂

Hi @Anonymous,

Any date fields stored in your data tables? If that is the case, you can turn on the 'advance' option and write t-sql query to filter on that field based on the max value from your table values.

Power Query SQL Server connector | Microsoft Docs

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.