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
vinkun
Frequent Visitor

Filter two dates (A and B) based on a third date C (A before C and B after C)

Hi,

 

For once I turn to you, marvelous community as there is a problem I can't solve after many attempts.

 

I have two tables, one for forecasts and another one for contracts.

I have one forecasting date and my contracts have 2 dates (start date and end date).

 

I would like to select (dropdown slicer) a Forecasting Date and that it filters all my contracts with the following condition :

Start Date < Forecasting Date 

End Date > Forecasting Date

 

It seems really easy, (and I hope it is) but I have spent many hours unsuccessfully.

 

Many thanks in advance,

Vincent

 

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

@vinkun,

 

You may use SELECTEDVALUE Function and take a good look at this discussion.

http://community.powerbi.com/t5/Desktop/Relational-Date-Filter-By-Other-Date-How-To/td-p/298373

Community Support Team _ Sam Zha
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

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@vinkun,

 

You may use SELECTEDVALUE Function and take a good look at this discussion.

http://community.powerbi.com/t5/Desktop/Relational-Date-Filter-By-Other-Date-How-To/td-p/298373

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks I'll have a look.

 

I already got the selectedvalue part, I'll read about the relative filtering, thanks. 

 

If the other thread solves my issue I'll mark the solution as good.

vinkun
Frequent Visitor

Thanks I have solved my issue.

 

It is not exactly the way I wanted, but maybe what I wanted was impossible.

 

With this methodology I need to create one new measure for any column that i want to use, unless there is a way to create a table based on these filters.

I will try this and post here again if I can manage to do it.

 

Many thanks anyway !

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.