The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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. 🙂