Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
First time poster.
I have a table that has multiple start and end dates that I need to filter based on a date slicer.
If I select 01/2022 as my slicer, I need to filter each start and end date as follows...
if ( End Date>=01/01/2022 Or (End Date Is Null AND Start Date]<=01/01/2022)
Expected Results
| Department | Division | Implementation Zone | Category ID | Target |
| Transportation | New York | NYP | 1 | 15 |
| Electrical | Philadelphia | PHL | 2 | 12 |
MonthlyTargetTable
| Department | Department Start Date | Department End Date | Division | Division Start Date | Division End Date | Implementation Zone | Implementation Zone Start Date | Implementation Zone End Date | Category ID | Target |
| Transportation | 01/01/2022 | New York | 01/01/2022 | NYP | 01/01/2022 | 1 | 10 | |||
| Transportation | 01/01/2022 | New York | 01/01/2022 | NYP | 01/01/2022 | 1 | 5 | |||
| Electrical | 01/01/2022 | 03/01/2022 | Philadelphia | 01/01/2022 | PHL | 01/01/2022 | 2 | 12 | ||
| Mechanical | 02/01/2022 | Philadelphia | 01/01/2022 | PHL | 01/01/2022 | 3 | 5 | |||
Solved! Go to Solution.
Hi @tomperro ,
According to your description, here's my solution.
Not sure if you have a date table as slicer, if not, create one.
Then create a measure.
Check =
VAR _S =
SELECTEDVALUE ( 'Date'[Date] )
RETURN
IF (
IF (
MAX ( 'MonthlyTarget'[Department End Date] ) <> BLANK (),
MAX ( 'MonthlyTarget'[Department End Date] ) >= _S,
MAX ( 'MonthlyTarget'[Department Start Date] ) <= _S
)
&& IF (
MAX ( 'MonthlyTarget'[Division End Date] ) <> BLANK (),
MAX ( 'MonthlyTarget'[Division End Date] ) >= _S,
MAX ( 'MonthlyTarget'[Division Start Date] ) <= _S
)
&& IF (
MAX ( 'MonthlyTarget'[Implementation Zone End Date] ) <> BLANK (),
MAX ( 'MonthlyTarget'[Implementation Zone End Date] ) >= _S,
MAX ( 'MonthlyTarget'[Implementation Zone Start Date] ) <= _S
),
1,
0
)
Put the measure in the visual and let it's value to 1. Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @tomperro ,
According to your description, here's my solution.
Not sure if you have a date table as slicer, if not, create one.
Then create a measure.
Check =
VAR _S =
SELECTEDVALUE ( 'Date'[Date] )
RETURN
IF (
IF (
MAX ( 'MonthlyTarget'[Department End Date] ) <> BLANK (),
MAX ( 'MonthlyTarget'[Department End Date] ) >= _S,
MAX ( 'MonthlyTarget'[Department Start Date] ) <= _S
)
&& IF (
MAX ( 'MonthlyTarget'[Division End Date] ) <> BLANK (),
MAX ( 'MonthlyTarget'[Division End Date] ) >= _S,
MAX ( 'MonthlyTarget'[Division Start Date] ) <= _S
)
&& IF (
MAX ( 'MonthlyTarget'[Implementation Zone End Date] ) <> BLANK (),
MAX ( 'MonthlyTarget'[Implementation Zone End Date] ) >= _S,
MAX ( 'MonthlyTarget'[Implementation Zone Start Date] ) <= _S
),
1,
0
)
Put the measure in the visual and let it's value to 1. Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 27 | |
| 23 | |
| 18 | |
| 18 | |
| 15 |
| User | Count |
|---|---|
| 53 | |
| 44 | |
| 42 | |
| 39 | |
| 34 |