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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
tomekm
Helper III
Helper III

Dynamic date filter using today's date to compute values

Hello,

 

I'm trying to create a dynamic date filter that will always take into consideration today's date in order to show only the next/upcoming date for each Item. Please see my table below. The idea is that when I filter on Item = A, and i'm looking at this report today (Nov 11th), it will show me only the row with date = 04-Dec-2021. If I filter on Item = B, it will show blank as all the dates available in the table for this item are in the past. If i filter on Item = C, it will show date = 14-Dec-2021, and so on. 

 

Any help would be appreciated. Thank you.

 

Item:Date:
A05-Sep-2021
B04-Jan-2021
C14-Dec-2021
A04-Dec-2021
B19-Feb-2021
C15-Dec-2021
A08-Jan-2022
B20-Mar-2021
C07-Feb-2022
2 ACCEPTED SOLUTIONS
smpa01
Super User
Super User

@tomekm  you can use this measure

Measure = CALCULATE(MAX('Table'[Date]),FILTER(VALUES('Table'[Date]),'Table 1'[Date]>=TODAY()))
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

YukiK
Impactful Individual
Impactful Individual

You can create a calculated column like in the screenshot below. Essentially, creating a column that captures the date if it's upcoming/in the future

 

YukiK_0-1638300798464.png


Hope this helps! Please give it a thumbs up!

View solution in original post

2 REPLIES 2
YukiK
Impactful Individual
Impactful Individual

You can create a calculated column like in the screenshot below. Essentially, creating a column that captures the date if it's upcoming/in the future

 

YukiK_0-1638300798464.png


Hope this helps! Please give it a thumbs up!

smpa01
Super User
Super User

@tomekm  you can use this measure

Measure = CALCULATE(MAX('Table'[Date]),FILTER(VALUES('Table'[Date]),'Table 1'[Date]>=TODAY()))
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.