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
MarvEw1111
Frequent Visitor

Adding rows with the same value until a condition is met

The following problem:

We have a time series, which we subtract from the DB. The data is available in such a way that a new value is only saved when there is a change in a column. Now I would like to create a complete time series. For this I would have to create a Power Query formula. This should add more rows with the same values until a change occurs. From that point on, the new values should be entered. The steps are in minute increments and the rows should be padded accordingly. Can anyone help me with this?

MarvEw1111_0-1681741961469.png

 

 

1 REPLY 1
artemus
Microsoft Employee
Microsoft Employee

start by creating a time list:

List.Generate(() => List.Min(myTable[Date]), each _ < List.Mac(myTable[Date]), each _ + #duration(0,0,1,0))

Next, convert the list to a table, and to a left join on that table with your primary table.

Finally, use Fill down to replicate the values in column A and B.

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.