+ Reply to Thread
Results 1 to 2 of 2

Power Query M - Filter last two days

  1. #1
    Registered User
    Join Date
    12-19-2019
    Location
    Jaraguá do Sul, Brazil
    MS-Off Ver
    2016
    Posts
    7

    Power Query M - Filter last two days

    Hello, I'm trying to write a formula to filter rows based on the "ReferenceDate" field.

    The problem is:

    If today is monday, filter today, (last) sunday and (last) Saturday.

    else filter today and yesterday;

    I wrote this code, but it seems to have a syntax error on the first "ReferenceDate"
    Please Login or Register  to view this content.
    Last edited by alansidman; 03-24-2021 at 07:27 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: Power Query M - Filter last two days

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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 - Days range issue
    By brandedadnan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-26-2021, 07:38 AM
  2. Days function in Power Query
    By hudson andrew in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2020, 10:23 AM
  3. [SOLVED] Power Query Filter
    By Richard_BAC in forum Excel General
    Replies: 25
    Last Post: 08-11-2020, 01:55 PM
  4. [SOLVED] Power Query Filter Column
    By bfaws in forum Excel General
    Replies: 3
    Last Post: 02-26-2020, 11:09 AM
  5. [SOLVED] Power Query Filter by Date Parameter
    By tkrupka in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-16-2019, 10:08 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. Power Query - Filter by Date
    By brent_milne in forum Excel General
    Replies: 0
    Last Post: 03-16-2017, 10:39 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