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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors