Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
YMANIEE
New Member

[need help] How to filter date from today~ +15 days

Hi guys,

 

I need a help with a dax formula.

How can I filter dates from today~ +15 days?

I am a newbie and couldn't find the answer on the net...

Please help!

 

Thank you. 🙂

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @YMANIEE ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Create a measure.

Measure =
VAR _today =
    TODAY ()
VAR _15days =
    TODAY () + 15
RETURN
    IF (
        MAX ( 'Table'[Date] ) >= _today
            && MAX ( 'Table'[Date] ) <= _15days,
        1,
        BLANK ()
    )

vpollymsft_0-1658721022678.png

If I have misunderstood your meaning, please provide your pbix file without privacy information and more details with your desired output.

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @YMANIEE ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Create a measure.

Measure =
VAR _today =
    TODAY ()
VAR _15days =
    TODAY () + 15
RETURN
    IF (
        MAX ( 'Table'[Date] ) >= _today
            && MAX ( 'Table'[Date] ) <= _15days,
        1,
        BLANK ()
    )

vpollymsft_0-1658721022678.png

If I have misunderstood your meaning, please provide your pbix file without privacy information and more details with your desired output.

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

MahyarTF
Memorable Member
Memorable Member

Hi,

If you are looking for the code for restricted date in particular days, you could use DateAdd Dax statement (Put NumberofInterval : -15 and Interval : Day)

https://dax.guide/dateadd/

Mahyartf
PC2790
Community Champion
Community Champion

Hey,

 

If you are looking to do some calculation taking into account 15 days, you can try this:

 

Measure = var _datetoday = TODAY()
var _dateafter15days = TODAY()+15
return
CALCULATE([Measure],FILTER('Table',DATESBETWEEN('Date'[Date],Datetoday,Date15days)))

Thanks for the reply,

 

This is what I inputed but I am getting error.

I want to simply filter the dates in SAP_date column with dates from today to +15 days)
I am totally newbie, please help again.

 

Thank you so much!

 

--------------------

Replenishment Schedule = var datetoday = today()
var dateafter15days = today()+15
return
calculate(Replenishment schedule,filter(smo_incoming_po,datesbetween(smo_incoming_po[SAP_date],datetoday,dateafter15days)))
-------------------
PC2790
Community Champion
Community Champion

What is the purpose of filtering the dates? Are you looking to show it somewhere or filter your columns based on that?

I want to just filter existing column.
This column contains data from today~ several months after, but i just need today +15 days data only.
This report refreshes everyday, and I cannot fix today's date.
I thought it was a simple filtering but I am struggling for couple of hours already lol

PC2790
Community Champion
Community Champion

You can make use of the Filter in Power Query by using the "In the Next"noption as sown below:

PC2790_0-1658488841256.pngPC2790_1-1658488876585.png

See if caters to your requirement

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.