+ Reply to Thread
Results 1 to 6 of 6

Power Query Filter All Rows After Prior Month

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    Shipley, UK
    MS-Off Ver
    Excel 2010
    Posts
    69

    Power Query Filter All Rows After Prior Month

    Hi All,

    I'm looking to create a filter on a dataset in power query editor that returns all rows that are dated in the prior month onwards, the filter syntax currently filters all activity from 1st June onwards, which has manually been selected is

    Please Login or Register  to view this content.
    I've researched and am unable to amend the syntax to accommodate the a programmable filter, ie, currently in June so filter all rows after 31st may 2018, when in the month of July, filter all rows after 30th June 2018, etc....


    Any help would be greatly appreciated

    Many thanks

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Power Query Filter All Rows After Prior Month

    Assuming [MinOfDelivery Date] is formatted as Date and not DateTime.

    Try...
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    08-06-2012
    Location
    Shipley, UK
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Power Query Filter All Rows After Prior Month

    the field is DateTime formatted

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Power Query Filter All Rows After Prior Month

    Then change to...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-06-2012
    Location
    Shipley, UK
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Power Query Filter All Rows After Prior Month

    Thank you for your help, but I cant seem to get it to work????

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Power Query Filter All Rows After Prior Month

    Can you give me bit more detail? Such as exact error message (screenshot) that you get when you try to apply the solution.

    If above fails, you could always set up single cell named range in Excel sheet and pass that on as variable in M.

    Ex: In any cell. =DATE(YEAR(TODAY()),MONTH(TODAY()),0) and name it prevmonth in name manager.
    Then in M (using PowerQuery advanced editor)... add following line after "let".
    Please Login or Register  to view this content.
    Then you can use it like...
    Please Login or Register  to view this content.

+ 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 / Get & Transform - filter text contains based on list
    By SHI.NL in forum Excel General
    Replies: 8
    Last Post: 05-14-2018, 04:53 PM
  2. Multi rows into Single row using power query
    By alipezu in forum Excel General
    Replies: 4
    Last Post: 10-22-2017, 08:02 AM
  3. [SOLVED] Power Query Not loading all Rows from Source File
    By jdriscol in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-21-2017, 04:03 PM
  4. Replies: 11
    Last Post: 08-01-2017, 06:08 AM
  5. [SOLVED] Changing Power Query rows to columns on repeat cells.
    By beaglesBuddy in forum Excel General
    Replies: 3
    Last Post: 06-14-2017, 02:13 PM
  6. Power Query - Filter by Date
    By brent_milne in forum Excel General
    Replies: 0
    Last Post: 03-16-2017, 10:39 AM
  7. Remove Unique rows in Power Query
    By danielmorrison in forum Excel General
    Replies: 2
    Last Post: 03-11-2016, 09:06 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