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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
mork
Helper V
Helper V

How to double filter using two date?

I have a table that has the bellow fields:

 

Project Name

Start Date

Completion Date

 

I want to have a visual table that has those three fields, this is quite easy to do.

 

But I also want to filter that table by both the Start Date and the Completion Date. I want to be able to select a date range and the table will show me all the projects that either the Start or the Completion Date are within the date range I selected.

 

I tried creating a datetable and relating both the Start Date and the Completion Date with that datetable but powerbi allows only one of the relationships to be active.

 

How can I achieve what I want?

2 REPLIES 2
Framet
Resolver II
Resolver II

Hi, 

 

You could create the create the date table but without a relationship at all. 

 

That way you could adjust the filter context of the measure accordingly.

 

For example to get a count of all projects of which at least one day crosses your date range filtered on the data table:

ProjectsCrossingDates :=
CALCULATE (
    COUNTROWS ( 'ProjectTable' ),
    FILTER (
        'ProjectTable',
        [Start Date] <= MAX ( DateTable[Date] )
            && [Completion Date] >= MIN ( DateTable[Date] )
    )
)

Note that having no active relationship to date requires that all measures requring time intelligence need to manually filtered in the way in which you expect them to react to the users date selections.

Hope this helps.

 

Thomas

Baskar
Resident Rockstar
Resident Rockstar

1. For this case u have to duplicate the table and create two relationship one for start Date and another one for completion date.

 

2. one more way is using Userelationship  function in calculations . 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors
Top Kudoed Authors