+ Reply to Thread
Results 1 to 3 of 3

Power BI - Filltering dates to +/- 10 days

  1. #1
    Registered User
    Join Date
    11-08-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Power BI - Filltering dates to +/- 10 days

    Hi,

    I'm a reasonably advanced user of Excel but new to Power BI.

    I have a large dataset consisting of temperature readings every fifteen minutes over a period of several years.

    I want to filter my results to + and - ten days from the current date.

    So far...

    I have created a measure to determine the day no of the current date:
    CurrentDayNo = value(today()-DATE(YEAR(today()),1,1)+1)

    I have created a measure to give the day number for the date in my dataset i.e. the temperature readings:
    DayX = value([TimeStamp]-DATE(YEAR([TimeStamp]),1,1)+1)

    Finally, I tried to create a measure to subtract one from the other (which I would then use as my filter):
    CurrentDayDiff = [CurrentDayNo]-[DayX]

    But this last measure gives an error:
    The value for DayX cannot be determined. Either the column doesn't exist, or there is no current row for this column.

    Any advice much apprecated. Perhaps my approach is wrong and/or there is an easier way of filtering my results?

    Thanks.
    Last edited by coolhandphil; 06-16-2022 at 07:12 PM.

  2. #2
    Forum Contributor
    Join Date
    08-12-2020
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 16
    Posts
    241

    Re: Power BI - Filltering dates to +/- 10 days

    Here is one way. Filter by column B, In Range.
    -Squeaky.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-08-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Power BI - Filltering dates to +/- 10 days

    Thanks, yes, this works.

+ 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] Count days between two dates in power query
    By Undo in forum Excel General
    Replies: 1
    Last Post: 12-03-2021, 01:15 PM
  2. Power Query M - Filter last two days
    By Saint_jordi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2021, 04:19 AM
  3. Days function in Power Query
    By hudson andrew in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2020, 10:23 AM
  4. [SOLVED] Calculating Years, Months, Week, Days, Hours, Minutes for Work Days between two dates
    By hecgroups in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-23-2019, 12:09 AM
  5. [SOLVED] Displaying the last 20 days (power pivot)
    By sovietchild in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 07-26-2018, 08:28 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: 10-31-2014, 10:32 AM

Tags for this Thread

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