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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Alessandro_Scal
Frequent Visitor

Time series

Hi Everybody,

 

I have generated a time series using the following code: GENERATESERIES(DATE(2023,1,1),DATE(2023,12,31),TIME(0,15,0)).

 

Everything seems fine until a certain point where the increment of 15 minutes is somehow reduced to 14 minutes and 59 seconds... does anyone know why this happens and how to fix it? I need to have an increase of exactly 15 minutes for every row. 

 

Alessandro_Scal_0-1694163870608.png

 

Thank you!

 

Alessandro

 

 

 

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

The Time value will be represented by a decimal number behind-the-scenes and the Generateseries algorithm, at some point, is losing something when translating between decimals and time values.  That's my best guess. 

Maybe one way to solve this is to replace the TIME with your own decimal.  I think 

0.041666667 / 4

might work but you'll need to test at your side.

0.041666667 is the decimal representation of 1 hour,  (1/24)  but with some rounding applied.

 

It will still break at some point if the sequence is long enough (i.e. more years in the sequence).

----

My solution is just a workaround really.  Maybe there is a better way of doing it (Power Query probably)

View solution in original post

2 REPLIES 2
Alessandro_Scal
Frequent Visitor

Workaround or not, it worked just fine!

 

Thanks

 

A

HotChilli
Super User
Super User

The Time value will be represented by a decimal number behind-the-scenes and the Generateseries algorithm, at some point, is losing something when translating between decimals and time values.  That's my best guess. 

Maybe one way to solve this is to replace the TIME with your own decimal.  I think 

0.041666667 / 4

might work but you'll need to test at your side.

0.041666667 is the decimal representation of 1 hour,  (1/24)  but with some rounding applied.

 

It will still break at some point if the sequence is long enough (i.e. more years in the sequence).

----

My solution is just a workaround really.  Maybe there is a better way of doing it (Power Query probably)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.