This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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?
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |