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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Extracting dates from date ranges

Hi all,

 

I have a data coming from our HR tool like this:

 

NameStart date of absenceEnd date of absence
John Doe01/10/201802/10/2018
Jane Doe02/10/201805/10/2018

 

I would like to generate a new table using the information above like the following:

 

NameAbsence date
John Doe01/10/2018
John Doe02/10/2018
Jane Doe02/10/2018
Jane Doe03/10/2018
Jane Doe04/10/2018
Jane Doe05/10/2018

 

Do you have any thoughts on how to convert this data?

 

Thanks!

Ugur

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

In the Query Editor..... Add a custom column as follows and convert it to date format

 

It will give you a list of dates from start to end.

 

 

{Number.From([Start date of absence])..Number.From([End date of absence])}

Then expand the list to new rows

listofdates.png

 

 

See file attached as well

View solution in original post

6 REPLIES 6
henriquesilveir
Resolver IV
Resolver IV

@Anonymous hello, you can use the Unpivot table, it will turn 2 columns into 1 column, take a look in this quickly video, and learn how to turn the number of your columns your need in 1.

 

Please, don' forget to mark this post as solution if you got it! other people can have the same situation in the future! 

Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

In the Query Editor..... Add a custom column as follows and convert it to date format

 

It will give you a list of dates from start to end.

 

 

{Number.From([Start date of absence])..Number.From([End date of absence])}

Then expand the list to new rows

listofdates.png

 

 

See file attached as well

Hi  Zubair_Muhammad

First of all, thanks for reply on this issue, I was looking for exactly same answer and this help me a lot, thinking in this same case, do you know if there´s a way to calculate the dates in range but considering only Monday to Friday? I´m working also in calculate absences but only that ones that apply to working week.

Thanks in advanced.

Anonymous
Not applicable

how to do this on custom tables?

Anonymous
Not applicable

Ist there also a formular for doing it the other way around.

So to get a Coloumn for each day to start and end date?

Anonymous
Not applicable

Hi @Zubair_Muhammad, That worked really well! Thanks!

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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