Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ThomasWeppler
Super User
Super User

Create a list with a start and an end date

Hi Power Bi community

I need to make a list for each row that show how many months have passed.

 

= Table.AddColumn(#"Filtered Rows2", "Month", each List.Generate(()=>[x=#date(2022,3,18)], each [x]<=#date(2025,6,24), each [x=Date.AddMonths([x],1)], each [x]))

 

I want to replace [x=#date(2022,3,18)] with the data from my colum Next_invoice_date
and

[x]<=#date(2025,6,24) with the data from my colum Expire_date

Can anyone help me with this?
All help will be greatly appreciated.

1 ACCEPTED SOLUTION
slorin
Super User
Super User

Hi @ThomasWeppler 

 

= 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]
)
)

Stéphane 

View solution in original post

2 REPLIES 2
slorin
Super User
Super User

Hi @ThomasWeppler 

 

= 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]
)
)

Stéphane 

Thanks a lot for the help. 🙂

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors