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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MingAn
New Member

1 slicer to filter 2 columns with different criteria

Hello, 

I have a table with 2 date fields; one is "Contract Start Date" and the other is "Contract End Date". I have created a filter for "Contract Start Date" with criteria is on or before "DATE"; and another filter for "Contract End Date" with criteria is on or after "DATE"

Example:

MingAn_0-1715349867682.png

The problem is I need to select the date twice everytime I change the date. Is there any way I can get one filter/slicer that filters my selection two different date columns (with different criteria - "Contract Start Date" is on or before "DATE"; "Contract End Date" is on or after "DATE") from the same table?

 

1 ACCEPTED SOLUTION
halfglassdarkly
Responsive Resident
Responsive Resident

If you create a seperate date dimension table disconnected from the other tables in your model you can use that in your slicer to select a date or date range. Then you can create a measure to filter the report based on the selected date. E.g. something like 

 

Date Filter = 

VAR MinDate = MIN('Date Dim'[Date])

VAR MaxDate = MAX('Date Dim'[Date])

VAR ContractStart = SELECTEDVALUE('Contract Table'[Contract Start])

VAR ContractEnd = SELECTEDVALUE('Contract Table'[Contract End])

RETURN

ContractStart <= MaxDate &&

ContractEnd >= MinDate

 

Which should return TRUE if the date criteria are met.

View solution in original post

1 REPLY 1
halfglassdarkly
Responsive Resident
Responsive Resident

If you create a seperate date dimension table disconnected from the other tables in your model you can use that in your slicer to select a date or date range. Then you can create a measure to filter the report based on the selected date. E.g. something like 

 

Date Filter = 

VAR MinDate = MIN('Date Dim'[Date])

VAR MaxDate = MAX('Date Dim'[Date])

VAR ContractStart = SELECTEDVALUE('Contract Table'[Contract Start])

VAR ContractEnd = SELECTEDVALUE('Contract Table'[Contract End])

RETURN

ContractStart <= MaxDate &&

ContractEnd >= MinDate

 

Which should return TRUE if the date criteria are met.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors