Forum Discussion

rajulshah's avatar
rajulshah
Resident Rockstar
5 years ago

Native Query > Query not folding after filtered rows

Hello everyone,

 

I have SQL datasource and fetching just one table.
I want to apply Incremental Refresh on the table. Hence, I created 2 parameters - RangeStart & RangeEnd and also both, parameters and the date field both have Date/Time as datatype.

 

So, when I do all the transformations, I am able to see 'View Native Query' as enabled. As soon as I filter the field with these parameters, it becomes disabled.

 

So I tried following alternatives:

  1. I tried to filter the field with just the date values, but I found very weird behaviour. Whenever I had "1st July 2021", it used to show as enabled. But whenever I tried other date value, let's say, "26th June 2021", it again got disabled.
  2. I tried the solution given in this blog but it used to work with a datevalue and didn't work with the Incremental Refresh parameters.
  3. I checked out the video by Patrick but I am not able to get the queries as mentioned by him.

Does anyone have faced this issue or can guide me through it?

Any help would be great.

Thanks in advance.

13 Replies

  • mwegener's avatar
    mwegener
    Most Valuable Professional

    Hi rajulshah ,

     

    what kind of database is your data source? (MS SQL?)

    To me the "Native Query" is more of an indicator, can you check on the database what query Power BI is really sending?

     

    • rajulshah's avatar
      rajulshah
      Resident Rockstar

      Hello mwegener , thank you for the response.

       

      Yes, the query sent to SQL Server has this filter applied, then also it would load all the data in Power BI and then filter it in there.

      • mwegener's avatar
        mwegener
        Most Valuable Professional

        Hi rajulshah ,

         

        if the filters are present in the SQL query, the query folding will also work and only the data that is needed will be transferred from SQL Server to Power BI.