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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Zahoul
Frequent Visitor

Use a date slicer to filter on a period instead of a single date

Hello,

 

I face an issue in my report.

 

Here is an example of a dataset I have (dates are in dd/MM/yyyy):

 

CodeStart dateEnd dateTitle
110/01/201920/01/2019My first loan
225/12/201812/01/2019My second loan
328/12/201805/02/2019My third loan
421/01/201908/02/2019My fourth loan

 

I use a date slicer (based on a Calendar table) and the calendar table is linked to the Start date of my dataset.

If I choose 01/01/2019 - 31/12/2019 in the date slicer, the system will return line 1 and 4.

But in my case I want all loans that live in the period. All 4 loans exist at some point in january.

 

However my date slicer can be linked to one column only and I don't see how I could manage to have all 4 results with a single date slicer.

 

Would there be a way to achieve this?

 

Many thanks in advance,

 

Julien

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Zahoul,

 

Disable the relationship, drag measure below to Visual level filters and set Show items when the value is 1.

Measure =
IF (
    SELECTEDVALUE ( Table1[Start date] ) <= MAX ( 'Calendar'[Date] )
        && SELECTEDVALUE ( Table1[End date] ) >= MIN ( 'Calendar'[Date] ),
    1
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@Zahoul,

 

Disable the relationship, drag measure below to Visual level filters and set Show items when the value is 1.

Measure =
IF (
    SELECTEDVALUE ( Table1[Start date] ) <= MAX ( 'Calendar'[Date] )
        && SELECTEDVALUE ( Table1[End date] ) >= MIN ( 'Calendar'[Date] ),
    1
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-chuncz-msft ,

Can the measure be done without the SELECTEDVALUE function? I don't have it in my tabular version...

 

AlB
Community Champion
Community Champion

Hi @Anonymous 

Instead of this:

SELECTEDVALUE ( Table1[Start date] )

try this, which should be equivalent:

IF ( HASONEVALUE ( Table1[Start date] ), VALUES( Table1[Start date]) ) 

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

Hello Sam,

 

Thank you very much for your help, it seems to do the job!

 

Julien

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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