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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Convert a line every 30 minutes

Hi, my data looks like a screenshot.

I have to make a matrix in which I will show what the production of my product looks like over time ("Value" column), which means I must be able to estimate how much product will be at a specific time (target matrix every 30 minutes) - also screenshot with excel example.

Any ideaa?

Mateusz_Ponka_1-1667482610805.png

Mateusz_Ponka_2-1667482681214.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Here's my solution in Power Query.

1.Create a table contains the time intervals.

let
    Source = List.Dates(DateTime.Date(DateTime.LocalNow()), 1, #duration(-1, 0, 0, 0)),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}}),
    #"Added Custom" = Table.AddColumn(#"Renamed Columns", "Time", each List.Times(#time(0, 0, 0), 96, #duration(0, 0, 30, 0))),
    #"Expanded Time" = Table.ExpandListColumn(#"Added Custom", "Time"),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Time",{{"Time", type time}, {"Date", type date}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Date"})
in
    #"Removed Columns"

vstephenmsft_0-1667554196544.png

 

2.Add a custom column to insert the table.

vstephenmsft_1-1667554221981.png

 

3.Expand the custom column.

vstephenmsft_2-1667554245565.png

 

4.Add a custom for filtering.

vstephenmsft_3-1667554264428.png

 

5.Filter out 0 and keep 1.

vstephenmsft_4-1667554293381.png

 

6.Select the time interval column and pivot below.

vstephenmsft_5-1667554320156.png

 

7.The result is as follows.

vstephenmsft_6-1667554393092.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

Here's my solution in Power Query.

1.Create a table contains the time intervals.

let
    Source = List.Dates(DateTime.Date(DateTime.LocalNow()), 1, #duration(-1, 0, 0, 0)),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}}),
    #"Added Custom" = Table.AddColumn(#"Renamed Columns", "Time", each List.Times(#time(0, 0, 0), 96, #duration(0, 0, 30, 0))),
    #"Expanded Time" = Table.ExpandListColumn(#"Added Custom", "Time"),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Time",{{"Time", type time}, {"Date", type date}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Date"})
in
    #"Removed Columns"

vstephenmsft_0-1667554196544.png

 

2.Add a custom column to insert the table.

vstephenmsft_1-1667554221981.png

 

3.Expand the custom column.

vstephenmsft_2-1667554245565.png

 

4.Add a custom for filtering.

vstephenmsft_3-1667554264428.png

 

5.Filter out 0 and keep 1.

vstephenmsft_4-1667554293381.png

 

6.Select the time interval column and pivot below.

vstephenmsft_5-1667554320156.png

 

7.The result is as follows.

vstephenmsft_6-1667554393092.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors