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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Issue comparing MIN and MAX date range slicer with table dates

Hello everyone,

 

I'd like to show all the lines which have an overlap period with the selected periode on the slicer.

I know I used to succeed this before, but I'm not able to find it back and I'm failing doing it again.

This version is a simplified version of the final behaviour, but this is where something is going wrong.


In this example, I'm trying to get a 1 flag for eah line that has the Date_debut between the dates selected in the slicer.

Showing the MIN and MAX part of the slicer in a measure works fine.

But as soon as I'm refering to a line, I'm losing the values of the slicer, what am I doing wrong?

For the 1st line : 01/07/2022 IS NOT <= 13/05/2022, but it keeps returning 1

 

overlap_period_slicer.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

My coworker disabled the relation between the slicer and the table...
Never mind, sorry for the inconveniance !

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

My coworker disabled the relation between the slicer and the table...
Never mind, sorry for the inconveniance !

Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_1-1673591733324.png

Date:

create with below dax formula

Date = CALENDAR(DATE(2020,01,01),DATE(2023,01,13))

vbinbinyumsft_0-1673591708521.png

2. create a measure with below dax formula

Test overlap =
VAR min_date =
    MINX ( 'Date', [Date] )
VAR max_date =
    MAXX ( 'Date', [Date] )
VAR cur_date =
    SELECTEDVALUE ( 'Table'[Date_debut] )
VAR tmp =
    CALENDAR ( min_date, max_date )
RETURN
    IF ( cur_date IN tmp, 1, 0 )

3. add a slicer with "Date" table field, add a table visual with "Table" field and measure

vbinbinyumsft_2-1673591876257.png

 

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

RemyO
Resolver I
Resolver I

Your Max slicer says 11/07/2023 in the details

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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