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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
SMaz
Frequent Visitor

Filter a table with dynamic dates

Hi everyone,

 

I have two tables : 

1. Classic Calendar table (date)

2. Project table (Project_code, Signature_date, Admin_launch_date, ...)

 

I want to create a report where I can :

1. Know how many projects have passed each milestone (signature, admininistrative launch, ...) => card with the measure

Nb_projects_signed_on_period = CALCULATE(COUNTA(PROJECTS[Project_code]), FILTER(PROJECTS, PROJECTS[SIGNATURE_DATE] >= MIN('CALENDAR'[DATE]) && PROJECTS[SIGNATURE_DATE] <= MAX('CALENDAR'[DATE])))
 

2. Visualize the projects that have passed each milestone => tables that needs to be filtered

SMaz_0-1729689892578.png

My issue is that I can't find how to filter my tables to get the correct projects that passed each milestone. 

Note : There are no relationships between the Calendar table and the Project table.

 

Thanks for your help !

1 ACCEPTED SOLUTION
v-jiewu-msft
Community Support
Community Support

Hi @SMaz ,

Based on the description, you can change the calendar date range in the slicer visual to filter the table data.

Try using the following DAX formula to create a new measure.

Measure = 
var _date = SELECTEDVALUE('Project Table'[Signature_date])
RETURN
IF(_date >= MIN('Table'[Date]) && _date <= MAX('Table'[Date]), 1, 0)

Then, set the show item is 1 in Filters pane.

vjiewumsft_0-1729734464822.png

vjiewumsft_1-1729734506641.png

Best Regards,

Wisdom Wu

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

2 REPLIES 2
SMaz
Frequent Visitor

Thanks a lot !

v-jiewu-msft
Community Support
Community Support

Hi @SMaz ,

Based on the description, you can change the calendar date range in the slicer visual to filter the table data.

Try using the following DAX formula to create a new measure.

Measure = 
var _date = SELECTEDVALUE('Project Table'[Signature_date])
RETURN
IF(_date >= MIN('Table'[Date]) && _date <= MAX('Table'[Date]), 1, 0)

Then, set the show item is 1 in Filters pane.

vjiewumsft_0-1729734464822.png

vjiewumsft_1-1729734506641.png

Best Regards,

Wisdom Wu

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.