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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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