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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
joechristo
Frequent Visitor

Date Slicer Filters Date1 OR Date2

I am creating a report that look sat two dates; Date1 and Date 2. I am trying to create a filter that looks at a selected date range and determines whether Date1 OR Date2 falls within that range.

 

 

i.e. a customer can select a date range 01/01/2023 - 15/01/2023 and all these records would appear in the table:

 

RecordDate1Date2
101/01/202305/01/2023
215/12/202210/01/2023
304/01/202302/02/2023

 

Is that possible? I am struggling because of the limits of passing selected values into dax columns, and there are no set periods where a customer might be looking between records.

 

7 REPLIES 7
FreemanZ
Super User
Super User

hi @joechristo 

Supposing you have a data table like:

FreemanZ_0-1683377928513.png

1) plot a slicer with a dates table like:

dates = 
CALENDAR(
    MIN( MIN(data[Date1]), MIN(data[Date2])),
    MAX( MAX(data[Date1]), MAX(data[Date2]))
)

(or you create the date table in other ways)

2) try to plot a table visual with all the columns, but filter that visual with a measure like:

measure = 
VAR _max = MAX(dates[date])
VAR _min = MIN(dates[date])
VAR result =
IF(
    OR(
        MAX(data[Date1])<=_max&&MAX(data[Date1])>=_min,
        MAX(data[Date2])<=_max&&MAX(data[Date2])>=_min
    ),
    1,
    0
)
RETURN result

3) choose value 1 for the measures

it worked like:

FreemanZ_1-1683378248863.png

 

Mahesh0016
Super User
Super User

@joechristo you want to date slicer fliter Only one of date column 

For this report I need two. Is there any way to do it? In our previous reporting software this is what is implemented and we need to reproduce it.

Mahesh0016
Super User
Super User

@joechristo Please Share you expected output.

I want a report page with a table and filter like this:

joechristo_0-1683287139692.png

Where the table is filtered so that either Date Appeal Determined or Date Decision Issued falls within the date range specified in the slicer

Hi @joechristo ,

Pelase find the below snap to get you know the details.

Gokul_G16_0-1683294831492.png

Regards,
Gokul

Hi Gokul, this isn't what I'm asking. This is regarding two separate date fields, not two dates in the same date field

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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