How can I enable incremental refresh for a dataset with irregular date keys

0 votes

How can I enable incremental refresh for a dataset with irregular date keys?
I need to set up incremental refresh in Power BI for a dataset where date keys do not follow a continuous sequence. The refresh should correctly partition the data while handling gaps in the date column. What is the best approach to configuring incremental refresh settings to accommodate these irregular date patterns?

1 day ago in Power BI by Evanjalin
• 22,610 points
15 views

1 answer to this question.

0 votes

To enable incremental refresh for a dataset with irregular date keys in Power BI, follow these steps:

1. Create a Continuous Date Table

Power BI’s incremental refresh requires a RangeStart and RangeEnd filter on a Date/DateTime column. Since your dataset has irregular date keys, create a continuous date table that covers the entire date range, ensuring every possible date exists.

  • Use Power Query (M code) to generate a continuous date range:

let  
    StartDate = #date(2020, 1, 1),  
    EndDate = Date.From(DateTime.LocalNow()),  
    DateList = List.Dates(StartDate, Number.From(EndDate - StartDate) + 1, #duration(1, 0, 0, 0)),  
    TableFromList = Table.FromList(DateList, Splitter.SplitByNothing(), {"Date"})  
in  
    TableFromList  
  • Map your irregular date key to this continuous table using relationships or joins.

2. Implement Incremental Refresh in Power Query

  • Filter the dataset using RangeStart and RangeEnd parameters:

    1. Define RangeStart and RangeEnd as Date/Time parameters.

    2. Apply a filter on your dataset:

Table.SelectRows(Source, each [DateColumn] >= RangeStart and [DateColumn] < RangeEnd)
    1. Adjust the filter to include only available data points.

3. Configure Incremental Refresh in Power BI

  • After transforming the data, go to Power BI Desktop > Model view and set up incremental refresh:

    1. Right-click the table and choose Incremental refresh.

    2. Define the historical and refresh periods (e.g., keep 2 years of data, refresh the last 1 month).

    3. Enable Detect data changes by selecting a column that tracks modifications (e.g., LastUpdated).

4. Publish & Validate in Power BI Service

  • After publishing, Power BI Service will handle partitioning efficiently, only refreshing the latest data while keeping historical data intact.

  • Test by refreshing a small range before enabling full refresh.

answered 1 day ago by anonymous
• 22,610 points

Related Questions In Power BI

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

I need to show a trendline for a moving average but only for selected date ranges—how can I do this?

To do a Moving Average Trendline that ...READ MORE

answered Mar 19 in Power BI by anonymous
• 22,610 points
30 views
0 votes
1 answer

How can I schedule data refresh for a Power BI report that connects to an on-prem SQL Server via a gateway?

The following steps will help you schedule ...READ MORE

answered 1 day ago in Power BI by anonymous
• 22,610 points
12 views
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,562 views
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 22, 2018 in Power BI by nirvana
• 3,130 points
2,892 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,520 points
1,673 views
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Open power bi report nd sign in ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited Mar 5 1,832 views
0 votes
1 answer

Why am I unable to set refresh for a web-based anonymous connection in Power BI Server, and how can I resolve it?

Scheduled refresh for web-based data sources that ...READ MORE

answered Feb 28 in Power BI by anonymous
• 22,610 points
96 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP