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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
LHub
New Member

Add 30m to date/time using Power Query.

Hello, 

 

I have a column with date/time stamps where I need the time stamps to be in 30 min increments, so instead of 03/01/2023 12:00:00 AM listed over 48 times I need row two to say 03/01/2023 12:30:00, then row 3 to say 03/01/2023 01:00:00, and so on. How can I do this in Power Query? (Bonus if it's 24 hr format)

 

LHub_0-1712849827966.png

 

Thank you!

1 ACCEPTED SOLUTION

@LHub Add an Index column starting at 0 and then a custom column:

= Table.AddColumn(#"Added Index", "Custom", each [Column1] + #duration(0,0,30,0) * [Index])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
LHub
New Member

@Greg_Deckler , 

 

Thank you! It was skipping every other day so I added a Modulo column up to 48 and that worked! 🎉

Greg_Deckler
Super User
Super User

@LHub Is this column all by itself or in a table with other columns? 

List.DateTimes( #datetime(2023, 3, 1, 0, 0, 0), 48, #duration(0,0,30,0))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

 

There are two columns, first is date/time stamp, second contains values associated with that date/time stamp.

 

LHub_0-1712851527710.png

 

@LHub Add an Index column starting at 0 and then a custom column:

= Table.AddColumn(#"Added Index", "Custom", each [Column1] + #duration(0,0,30,0) * [Index])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors