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
suvechha
Helper IV
Helper IV

Is there any way I can edit the power query and make the Year > 2018 in power bi report service ?

Hi there ,

I have a ms sql server db connection to the one specific view with Year > 2020 . But I want to 2 more years i.e from 2018.

But with my Power BI Desktop power query its going out of memory . 

 

I have created on-premise data gateways in power bi report service.

 

Is there any way I can edit the power query and make the Year > 2018 in power bi report service ?

 

Thanks

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @suvechha,

If you are working with SQL data connector and common SQL table, you can add a custom t-SQL query in advanced option -> SQL statement to get filtered records.

Power Query SQL Server connector - Power Query | Microsoft Docs
If you are working with a view that includes a specific filter effect applied on the database side, I don't think you can do custom form power bi side to ignore the original effect and apply new filter effects. (power bi does not include write back features)

Regards,
Xiaoxin Sheng

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

If you have the required permissions, you can write a query and use it in Power Query. However, if you are using a view that has a filter on year > 2020, you won't be able to change that logic in Power Query as the data is already filtered at the database level. 

Try writing a sql script with your own filters and then use it in Power BI Desktop (Power Query).

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.