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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.