• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Large data set, filtering and determining duration between two records.|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Large data set, filtering and determining duration between two records.|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Large data set, filtering and deter…
sp_PrintTopic sp_TopicIcon
Large data set, filtering and determining duration between two records.
Avatar
Alan Ramsay
Member
Members
Level 0
Forum Posts: 79
Member Since:
April 23, 2015
sp_UserOfflineSmall Offline
1
December 21, 2019 - 8:58 am
sp_Permalink sp_Print

Hi there,

I hope I can explain this one clearly - just spent a very frustrating 3 hours trying to figure it out myself and failing!

The attached file has two tabs:

Data - this is a small section of the actual data set I am working with.

What I want - is a sample of what I would ideally like to be able to do with the original data set in tab "Data" (I did some extracting etc. to get the representation in the What I want tab).

Background

Every day I pull an extract from one the company databases and append the records to the bottom of the table the sample of which is shown in the "Data" tab.  The Flow Change and Time columns are not part of the original data. 

I want to be able to filter, (slicers?), on the "Name" value and see the duration difference in the "Time" column between each row record that is filtered, (you can see how I think it should look in the What I want tab).  But I get some bogus durations when I set up the filter and select a single Name value - why is that?  How to fix it?

Many thanks,

Alan

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
2
December 21, 2019 - 11:45 am
sp_Permalink sp_Print sp_EditHistory

Hi Alan

The reason why your formula is not giving the result is because they are referring to the actual cells (even when they are hidden.filtered) and not the filtered cells above that you actually wanted.

My workaround is rather long and you may have to modify them to suit your needs.

I have separated the formulas into multiple helper columns so you can see what I am trying to do.

1) Column H is the key. It is a running sequence that will adjust no matter how you filter.

2) In column I, I use Match to get the row number of the cell above (I less 1 to cater for the header).

3) Column J then extract the time of the row above.

4) Column K then calculates the down time.

You can combine the above formulas into a single mega formula but it is going to be very difficult to understand and debug.

Hope this helps.

Sunny

Avatar
Alan Ramsay
Member
Members
Level 0
Forum Posts: 79
Member Since:
April 23, 2015
sp_UserOfflineSmall Offline
3
December 25, 2019 - 6:05 am
sp_Permalink sp_Print

Hi Sunny,

A huge help, many thanks.  Applied to the bigger data set the calculations take a little time but the result is what I wanted - many thanks.

The only other question I have is how do you manage to figure out these solutions??? 🙂

Alan

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
4
December 26, 2019 - 1:06 am
sp_Permalink sp_Print

Hi Alan

If i don't know the answer I will google Laughto see if such solutions already exist (no need to recreate the wheel).

99% of the time the solution is not available but some may have partial solutions that I can use.

Column H is the key and I got it from here : https://stackoverflow.com/ques.....isible-row

As for the other columns, I worked it out by myself.

How do I know if any partial solution will help? Well, I can only say it is thru experience/gut feeling/instinct (and many times a bit of luck Laugh)

My advice is to help others as this will allow us to learn what we don't know as every question has its own challenges that requires different solutions.

Hope I gave you some insights on my method in coming up with solutions.

Sunny

Avatar
Alan Ramsay
Member
Members
Level 0
Forum Posts: 79
Member Since:
April 23, 2015
sp_UserOfflineSmall Offline
5
December 28, 2019 - 3:35 am
sp_Permalink sp_Print

Hi Sunny,

Many thanks for your candid and insightful response.  I like the idea that by helping others find answers you increase your own skills - seems obvious but maybe not something people readily realize - myself included - will need to fix that!

Thanks again,

Alan

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Shanna Henseler, Lawrence Smith
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6212
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31889
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.