+ Reply to Thread
Results 1 to 5 of 5

Net workdays in Power Query

  1. #1
    Registered User
    Join Date
    12-02-2016
    Location
    Stockholm
    MS-Off Ver
    2019
    Posts
    27

    Net workdays in Power Query

    Hello all,

    I'm using Power Query to extract and transform data into a usable file format. In the source file there are some simple days between dates-calculations. As I want to have the number of working days between these dates as well, I use the networkdays-function in the sheet, but I would like to have this task automated in PQ instead. I can't seem to find a function for that in PQ as it is, can someone show me a way to achieve this? I've attached both example files.

    All help is much appreciated.

    BR

    Frejo
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,834

    Re: Net workdays in Power Query

    This requires a custom function - there's a simple solution described in this thread: https://community.powerbi.com/t5/Des...el/td-p/518920
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,834

    Re: Net workdays in Power Query

    Here's your file with the function from that link implemented. You will need to change the source of the original workbook back to your own location in the query, of course.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-02-2016
    Location
    Stockholm
    MS-Off Ver
    2019
    Posts
    27

    Re: Net workdays in Power Query

    Awesome, it works great!

    Thanks AliGW

    BR

    Frejo

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,834

    Re: Net workdays in Power Query

    Please update your forum profile - I believe you are using something newer than Excel 2010. Thanks!

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Last edited by AliGW; 12-17-2020 at 11:08 AM.

+ 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. [SOLVED] Power Query/Power Pivot Conditional Column creation & chart
    By mz_h in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-12-2020, 06:07 PM
  2. [SOLVED] 2 fields checker- Request for alternative option in Power Query or Power Pivot
    By Shareez Saleem in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-15-2020, 08:36 AM
  3. Replies: 10
    Last Post: 06-25-2020, 12:19 AM
  4. [SOLVED] Power Query - excel formula translation into Power Query
    By afgi in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 02-19-2020, 03:38 AM
  5. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  6. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  7. Replies: 0
    Last Post: 04-05-2018, 01:16 AM

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