+ Reply to Thread
Results 1 to 1 of 1

Power query custom function to calculate duration based on various working hour time zone

  1. #1
    Registered User
    Join Date
    12-26-2018
    Location
    KL
    MS-Off Ver
    365
    Posts
    6

    Power query custom function to calculate duration based on various working hour time zone

    Hi All,

    I have a macro file with a custom function created by my ex-colleague that calculates the duration of each ticket on a single timezone with all the public holidays, weekends, and outside business hours considered. This worked great for us, however, I can't figure out how we can calculate the duration based on multiple working hours. I'll give it an example below.

    Example:
    Market A - 9am to 6pm
    Market B - 11am to 8pm

    So, the result based on the above example is we want to start calculating the duration for Market A 9am to 6pm, whereas for Market B 11am to 8pm.

    All the date and time extracted from the system is on the same time zone. Thus, we need to be able to differentiate our working hours based on various markets.

    The custom function only allows me to define one working business hours. Our requirement is that we need to define several working business hours for different markets. These are based on the "Incident List" tab "Project" column in the Power Query Editor.

    Basically how this macro file works is it pulls two excel files together and the power query work its magic to merge the data inside to present us the information on the dashboard.

    The custom function name is "Networkhour".
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to update a custom function in Power Query
    By MangoFresh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-10-2023, 08:58 AM
  2. [SOLVED] Power Query - How to use Time Duration hh:mm:ss
    By NewYears1978 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2022, 11:27 AM
  3. Power query Custom function / parameter query
    By Dicken in forum Office 365
    Replies: 0
    Last Post: 03-23-2022, 10:41 AM
  4. [SOLVED] Power Query logic to calculate only working hours between two date/time values
    By adamnc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2021, 05:14 PM
  5. Power Query custom formula not working for 1 single condition
    By Izzii0x in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-27-2021, 03:08 AM
  6. Power Query - Invoke Custom Function
    By leukep in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2017, 02:18 PM
  7. Calculate finish time given start time, working hours and job duration
    By swanseaexcel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2012, 03:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1