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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.