Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
I have a table in Excel / Power Query that has the following structure:
| PPC | LocationID | Cycle | Effective from | Effective until | Group | Value |
| A | 1 | Q1 | 2024-01-01 | 2024-04-01 | A1 | 135.540 |
| A | 1 | Q1 | 2024-01-01 | 2024-04-01 | A2 | 180.718 |
| A | 1 | Q1 | 2024-01-01 | 2024-04-01 | A3 | - |
| A | 1 | Q1 | 2024-01-01 | 2024-04-01 | A4 | 532.836 |
| A | 1 | Q1 | 2024-01-01 | 2024-04-01 | A5 | 232.353 |
| A | 2 | Q1 | 2024-01-01 | 2024-04-01 | A1 | 6.672 |
| A | 2 | Q1 | 2024-01-01 | 2024-04-01 | A2 | 8.896 |
| A | 2 | Q1 | 2024-01-01 | 2024-04-01 | A3 | 34.311 |
| A | 2 | Q1 | 2024-01-01 | 2024-04-01 | A4 | 58.821 |
| A | 2 | Q1 | 2024-01-01 | 2024-04-01 | A5 | 11.436 |
| A | 3 | Q1 | 2024-01-01 | 2024-04-01 | A1 | 4.707 |
| A | 3 | Q1 | 2024-01-01 | 2024-04-01 | A2 | 6.278 |
| A | 3 | Q1 | 2024-01-01 | 2024-04-01 | A3 | 24.213 |
| A | 3 | Q1 | 2024-01-01 | 2024-04-01 | A4 | 78.741 |
| A | 3 | Q1 | 2024-01-01 | 2024-04-01 | A5 | 8.070 |
| A | 1 | Q2 | 2024-04-08 | 2024-07-08 | A1 | 135.540 |
| A | 1 | Q2 | 2024-04-08 | 2024-07-08 | A2 | 180.718 |
| A | 1 | Q2 | 2024-04-08 | 2024-07-08 | A3 | - |
Now, I would like to have a table in the end that fills the same elements into the dates between the from and until date.
So, I would like to get the values extrapolated for the weeks between the effective from and until date.
See the expected result below:
| Article | Country | Quarter | Date | Group | Value |
| A | 1 | Q1 | 2024-01-01 | A1 | 135.540 |
| A | 1 | Q1 | 2024-01-01 | A2 | 180.718 |
| A | 1 | Q1 | 2024-01-01 | A3 | - |
| A | 1 | Q1 | 2024-01-01 | A4 | 532.836 |
| A | 1 | Q1 | 2024-01-01 | A5 | 232.353 |
| A | 1 | Q1 | 2024-01-08 | A1 | 135.540 |
| A | 1 | Q1 | 2024-01-08 | A2 | 180.718 |
| A | 1 | Q1 | 2024-01-08 | A3 | - |
| A | 1 | Q1 | 2024-01-08 | A4 | 532.836 |
| A | 1 | Q1 | 2024-01-08 | A5 | 232.353 |
| A | 1 | Q1 | 2024-01-15 | A1 | 135.540 |
| A | 1 | Q1 | 2024-01-15 | A2 | 180.718 |
| A | 1 | Q1 | 2024-01-15 | A3 | - |
| A | 1 | Q1 | 2024-01-15 | A4 | 532.836 |
| A | 1 | Q1 | 2024-01-15 | A5 | 232.353 |
How would you do that with Power Query?
If required, I have a calendar table with all the dates etc.
Hi @joshua1990
add column
List.Dates(
[Effective from],
Duration.Days([Effective until]-[Effective from])/7+1,
#duration(7,0,0,0)
)
then expand
Stéphane
let
Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
comb = Table.CombineColumns(
Source,
{"Effective from", "Effective until"},
(w) => List.Generate(
() => w{0},
(x) => x <= w{1},
(x) => Date.AddDays(x, 7)
),
"Date"
),
result = Table.ExpandListColumn(comb, "Date")
in
result
then sort and/or rename columns to your liking
What is the transformation logic?
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.