Forum Discussion

danyzion's avatar
danyzion
New Member
1 year ago
Solved

Incremental Refresh

Hi,   I have a power bi dashboard which pulls the data from my SQL query.  The query runs for data since 202301 which is taking a lot of time. I have created parameters for rangestart and range end...
  • rajendraongole1's avatar
    rajendraongole1
    1 year ago

    Hi danyzion -Yes, if you've set the RangeStart and RangeEnd parameters in your SQL query and your Power BI incremental refresh policy to only refresh the last three months, your dashboard will adhere to these constraints

    Data Range in SQL Query: Since your SQL query includes a filter up to RangeEnd (e.g., 202405), Power BI will not retrieve data beyond that date. It will pull only the records up to 202405, so you won’t get any data beyond this end date unless you manually update the RangeEnd parameter in your query.

     

    With the incremental refresh policy set to refresh only the last three months, Power BI will refresh data only for the three most recent months within the range specified by your parameters. This means it will refresh records for 202403, 202404, and 202405 only.

    So, if you want to extend the refresh window beyond 202405 in the future, you’ll need to update the RangeEnd parameter to reflect the new date range.

  • Bibiano_Geraldo's avatar
    1 year ago

    Hi danyzion, let’s address your questions one by one:

     

    Range End Parameter:

    If you set a RangeEnd parameter to a specific date, such as 202405, your dashboard will pull data only up to that date. This means that any data beyond 202405 will not be included in your dataset.

     

    Refreshing Data for Latest Months:

    When you make changes to the backend code and want to refresh only the latest months (e.g., the last 3 months), you can leverage the incremental refresh policy. Ensure that your incremental refresh policy is set correctly to refresh only the last 3 months. This way, even if you make changes to the backend code, only the data for the specified period will be refreshed.

     

    Modifying Backend Query:

    If you skip the RangeEnd and pull data since 202301, the incremental refresh will continue to refresh the latest 3 months of data. However, if you modify the backend query (e.g., adding or removing a column), Power BI will treat this as a structural change. In such cases, the entire dataset might need to be refreshed from the beginning (202301) to accommodate the changes.

    You can learn more about incremental refresh Here