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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jalaomar
Helper IV
Helper IV

Filter out dates (past and future) in a table

Hi all,

 

I need help to set some dynamic filtering in a table. I have large list of Projects and what I would like to do is to filter out all projects that have baseline in the future and only include current month baseline.

 

in the screenshot, there is a filter to only include 2021 ITG4 actual dates and when it comes to ITG4 baseline, i would like to dynamially only show data that is relevant to current month period.

 

IF ITG4 baseline is 2021-11-15 and we are in september month, this project is not visible but when we are in Novmber month, this project will show in the table.

 

any idea how to create this dynamic filter/measure?

 

Many thanks!

 

BR

J2021-09-27_20-26-39.png

 

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Hazarding a guess here but try the equivalent to:

Filter out future baselines =

VAR CurrMonth = YEAR(TODAY()) * 100 + MONTH (TODAY())

VAR SelBL = MAX(Table[Baseline])

VAR selP = YEAR(SelBL) * 100 + MONTH (SelBL)

RETURN

COUNTROWS (

FILTER( Table, SelP <= CurrMonth)

)

Then add this measure to the filters for the visual in the filter pane and set the value to  1





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
jalaomar
Helper IV
Helper IV

Hi @PaulDBrown , tried out this measure and it is working good! 

super nice and many thanks for the support!!

 

BR

Jala

PaulDBrown
Community Champion
Community Champion

Hazarding a guess here but try the equivalent to:

Filter out future baselines =

VAR CurrMonth = YEAR(TODAY()) * 100 + MONTH (TODAY())

VAR SelBL = MAX(Table[Baseline])

VAR selP = YEAR(SelBL) * 100 + MONTH (SelBL)

RETURN

COUNTROWS (

FILTER( Table, SelP <= CurrMonth)

)

Then add this measure to the filters for the visual in the filter pane and set the value to  1





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.