+ Reply to Thread
Results 1 to 4 of 4

Power Query Duration Between Two Dates

  1. #1
    Registered User
    Join Date
    07-02-2011
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    10

    Power Query Duration Between Two Dates

    Hi All,

    I have this formula =IF([@[Target Re-Submission Date]]="","",IF(TODAY()-[@[Target Re-Submission Date]]<=-1,"",TODAY()-[@[Target Re-Submission Date]]))

    How can I write this in Power Query?

    Thanks,
    Mielkew

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Power Query Duration Between Two Dates

    Hi mielkew,

    I think you are looking for the answer given on
    https://social.technet.microsoft.com...rum=powerquery

    If we could see the data it might make more sense.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    07-02-2011
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Power Query Duration Between Two Dates

    Hi Marvin,

    Please see attached Sample Workbook.


    Thanks,
    Mielkew
    Attached Files Attached Files

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Power Query Duration Between Two Dates

    Hi,

    You need to use the Add Conditional Column dialog in Power Query. Here is a video showing how to use it.

    https://www.bing.com/videos/search?q...DB&FORM=VRDGAR

    There is a dropdown for a date and "Today" is one of the selections.

    Also - you might need to add a new column that has the date of "Today" in it. Then in using the Add Conditional Column dialog you can stipulate "Today" as a column reference.

+ 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. error in power query & power pivot
    By Baldev Kumar in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-03-2018, 01:34 AM
  2. Power Query - Add dates to fixed Data set
    By happydays886 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-17-2017, 10:40 AM
  3. SQL -> Power Query SQL
    By happydays886 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-14-2017, 11:56 AM
  4. [SOLVED] power query
    By juanda92 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2016, 08:56 AM
  5. VBA and Power Query
    By Brawnystaff in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-16-2015, 05:10 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