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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
JB17
Frequent Visitor

Filtered Date

Hi,

Can you help me how to translate below underlined statement in DAX:

      Is before today and is after September 30, 2024 

I know this can be done in filters but I wanted to avoid manual date set up everytime I will refresh the reports. Thank you so much in advance! 

4 REPLIES 4
v-kpoloju-msft
Community Support
Community Support

Hi @JB17,

Thank you for reaching out to the Microsoft fabric community forum. Also, thanks to @Kedar_Pande, @Rufyda, @rohit1991, for those inputs on this thread. I reproduced the scenario, and it worked on my end. I used it as sample data and successfully implemented it.

outcome:

vkpolojumsft_1-1761721334166.png

 


I am also including .pbix file for your better understanding, please have a look into it.

Hope this clears it up. Let us know if you have any doubts regarding this. We will be happy to help.

Thank you for using the Microsoft Fabric Community Forum.

Kedar_Pande
Super User
Super User

'Table'[Date] < TODAY() && 'Table'[Date] > DATE(2024, 9, 30)

 

If this answer helped, please click Kudos or mark as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande

Rufyda
Kudo Kingpin
Kudo Kingpin

Hi @JB17 
FilteredDate =
VAR _today = TODAY()
VAR _cutoff = DATE(2024, 9, 30)
RETURN
          IF ( 'Date'[Date] < _today && 'Date'[Date] > _cutoff, 1, 0 )

 

You can learn more here:

TODAY function (DAX): https://learn.microsoft.com/en-us/dax/today-function-dax

DATE function (DAX): https://learn.microsoft.com/en-us/dax/date-function-dax


If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Regards,
Rufyda Rahma | Microsoft MIE
https : https://www.linkedin.com/in/rufyda-abdelhadirahma/
Blog : https://medium.com/@rufydarahma


rohit1991
Super User
Super User

Hi @JB17 


You can do this easily with a small DAX formula instead of setting manual filters every time.

Could you please try below Steps:

  1. Create a calculated column or measure with this DAX:
  2. Add this to your visual-level filters and set it to FilteredDate = 1.

FilteredDate =
VAR _today = TODAY()
VAR _cutoff = DATE(2024, 9, 30)
RETURN
IF(
    'Date'[Date] < _today &&
    'Date'[Date] > _cutoff,
    1
)

Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.