Finding the Date of the Next Record in Power Query

Today I’m going to share my solution to a question I found on the MrExcel forum. It’s an interesting problem.

https://www.mrexcel.com/board/threads/power-query-to-determine-consecutive-and-non-consecutive-dates.1261496/

Let me briefly explain the problem.

The Problem

We have the following table, which contains the source data.  Each row contains a unique ID (maybe a piece of equipment) and failure dates; each failure date in a new column.

Input

So, for ID 123, a failure occurred on the 17th of June and again on 19th June. Because the dates are not consecutive (week days), they are treated as 2 events.  Then the event on 19th June is followed by an event on 20th, 21st (Friday), 24th (Monday).  All these dates were the same event.  Failure first occurred on the 19th and the last failure was the 24th.

The Required Output

The objective from the OP is to transform the table above into the below format.

Final Output

The Solution

I have recorded the following video showing you how I solve this problem.  I’ve used many tricks that I have learnt over my years using and teaching Power Query.

This solution is very similar to a previous video I created here, if you are interested. https://www.youtube.com/watch?v=xN2IRXQ2CvI

 

124 thoughts on “Finding the Date of the Next Record in Power Query”

  1. 💡 Excellent work on this ultimate guide! every paragraph is packed with value. It’s obvious a lot of research and love went into this piece. If your readers want to put these 7 steps into action immediately, we’d be honoured to help: 👉 https://meinestadtkleinanzeigen.de/ – Germany’s fastest-growing kleinanzeigen & directory hub. • 100 % free listings • Auto-sync to 50+ local citation partners • Instant push to Google Maps data layer Drop your company profile today and watch the local calls start rolling in. Keep inspiring, and thanks again for raising the bar for German SEO content!

  2. 💡 Excellent work on this ultimate guide! every paragraph is packed with value. It’s obvious a lot of research and love went into this piece. If your readers want to put these 7 steps into action immediately, we’d be honoured to help: 👉 https://meinestadtkleinanzeigen.de/ – Germany’s fastest-growing kleinanzeigen & directory hub. • 100 % free listings • Auto-sync to 50+ local citation partners • Instant push to Google Maps data layer Drop your company profile today and watch the local calls start rolling in. Keep inspiring, and thanks again for raising the bar for German SEO content!

  3. Fantastic read! 👏 I really appreciate how clearly you explained the topic—your writing not only shows expertise but also makes the subject approachable for a wide audience. It’s rare to come across content that feels both insightful and practical at the same time. At explodingbrands.de we run a growing directory site in Germany that features businesses from many different categories. That’s why I truly value articles like yours, because they highlight how knowledge and visibility can create stronger connections between people, services, and opportunities.Keep up the great work—I’ll definitely be checking back for more of your insights! 🚀

  4. This is such a valuable article! 👏 I really like how you’ve managed to explain the topic in a clear and practical way—it feels authentic and easy to relate to. Reading it gave me some new perspectives that I can actually apply. I’m especially interested in content like this because at meinestadtkleinanzeigen.de we’re running a classifieds and directory platform in Germany that connects people with services, businesses, and opportunities across many categories. Insights like yours remind me how powerful it is when knowledge and connections come together. Thanks for sharing—looking forward to more of your work! 🚀

  5. Really well-written article! 👏 I enjoyed the way you broke down the topic—it feels very genuine and helpful, not just theory. The practical tips make it easy for readers like me to connect and actually take something useful away.At meinestadtkleinanzeigen.de , we’re building a directory and classifieds platform in Germany where people can discover businesses, services, and opportunities across many categories. That’s why I especially value content like yours, because it shows how sharing knowledge online can really create connections.Keep up the great work—I’ll definitely be following along for more insights! 🚀

  6. Finding the date of the next record in Power Query is such a practical technique, especially when dealing with time series data. It’s a great way to calculate durations, track gaps, or prepare cleaner models for reporting and analytics

  7. Really helpful guide! Working with dates in Power Query can get tricky, especially when you’re trying to reference future records. This explanation made it so much clearer. Definitely going to try this out in my reports thanks for breaking it down so well.

  8. Very useful tip! 📅 Finding the date of the next record in Power Query can be tricky, but this guide explains it so well. Great use of indexing and merging to solve a common data challenge. Perfect for anyone working with time series or sequential data in Power BI!

  9. Such a handy trick for time-based data analysis! ⏳ Using Power Query to find the next record’s date can help with calculating durations, lead times, or gaps in data. Sorting and adding an index with a merge step does the magic. Smart and super useful

  10. Great tutorial! Finding the date of the next record in Power Query is super helpful for time-based analysis and comparisons. Clear explanation and very practical!

  11. Лучшее качество при несъемном протезировании на 4 имплантах.
    Протезирование на 4 имплантах [url=https://ggpatl.by/allon4-implantaciya]https://ggpatl.by/allon4-implantaciya[/url] .

  12. Куклы бебета с аксессуарами и одеждой.
    Бебета кукли като истински [url=http://www.kukli-bebeta.com]http://www.kukli-bebeta.com[/url] .

  13. Цены на популярные антистресс игрушки.
    Антистрес играчки за мачкане [url=http://www.antistres-igrachki.com/]http://www.antistres-igrachki.com/[/url] .

Leave a Comment

Your email address will not be published. Required fields are marked *