Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Power BI Community
I have this column generates a list of months between two dates.
However I want the list to be diffrent based on a value called periodes that determines how many months the list should jump between each row.
Now I have this code.
= Table.AddColumn(#"Filtered Rows2", "Month",
(r) => List.Generate(
()=>[x=r[Next_invoice_date]],
each [x]<=r[Expire_date],
each [x=Date.AddMonths([x],1)],
each [x]))
But I want the number 1 to be repalce with the value in a colum called Period
Does anyone knows how to do that?
All help will be greatly appreciated.
Solved! Go to Solution.
1 --> r[Period]
r = actual row
= Table.AddColumn(#"Filtered Rows2", "Month",
(r) => List.Generate(
()=>[x=r[Next_invoice_date]],
each [x]<=r[Expire_date],
each [x=Date.AddMonths([x],r[Period])],
each [x]))
Stéphane
1 --> r[Period]
r = actual row
= Table.AddColumn(#"Filtered Rows2", "Month",
(r) => List.Generate(
()=>[x=r[Next_invoice_date]],
each [x]<=r[Expire_date],
each [x=Date.AddMonths([x],r[Period])],
each [x]))
Stéphane
Thanks again. 🙂
Check out the July 2025 Power BI update to learn about new features.