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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
akdoro
New Member

M Query : Create a table using input from another table

I have this table, let us call it 'tblSeasons'

 

 StartDate   EndDate   Season

02-05-20165-05-2016Round 0
11-05-201615-08-2016Round 1
21-08-201615-11-2016Round 2
16-11-201609-01-2017Round 3
10-01-201715-02-2017Round 4
01-04-201720-05-2017Round 0

 

 

I want to generate another table 'SeasonDetails' with continuous dates using the above table as the input parameter :

 

That is:

 

DateRound
02-05-2016Round 0
03-05-2016Round 0
04-05-2016Round 0
05-05-2016Round 0
11-05-2016Round 1
12-05-2016Round 1
13-05-2016Round 1
14-05-2016Round 1
15-05-2016Round 1

 

 

etc..

 

How do I go about this?

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

here you will find a little example (open the query editor).

 

Basically I added a custom column using this formula

List.Dates(
  [DateStart],
  Number.From([DateEnd]) - Number.From([DateStart]) + 1,
  #duration(1,0,0,0)
)

You have to make sure that your columns are date columns and have valid entries. My Formula does not consider any Data Quality check or similar stuff 🙂 The Formula creates a list.

 

The next step is: expand the list as new rows:

2017-07-11_22-24-20.png

 

Hope this helps



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
TomMartens
Super User
Super User

Hey,

 

here you will find a little example (open the query editor).

 

Basically I added a custom column using this formula

List.Dates(
  [DateStart],
  Number.From([DateEnd]) - Number.From([DateStart]) + 1,
  #duration(1,0,0,0)
)

You have to make sure that your columns are date columns and have valid entries. My Formula does not consider any Data Quality check or similar stuff 🙂 The Formula creates a list.

 

The next step is: expand the list as new rows:

2017-07-11_22-24-20.png

 

Hope this helps



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

@TomMartens ThankYou! That works!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.