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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Using one slicer on 2 different date columns

Hi,

 

I'm pulling data from only one table for my report. I have 2 date columns - effective date and expired date. I need to use only one slicer in my report so that I can apply filter on both effective date and expired date as below.

 

policy eff dt <= slicer date

and 

expired dt > slicer date

 

Please let me know if this can be achieved?

Thanks in advance.

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

Hi @Anonymous ,

 

1. Create a date table and add the date column in slicer.

 

date = CALENDARAUTO()

2. Create a measure and make the table visual filtered by the measure.

 

Measure = 
VAR _exp =
    MAX ( Table1[expired date] )
VAR _eff =
    MAX ( Table1[effective date] )
VAR _sele =
    SELECTEDVALUE ( 'date'[Date] )
RETURN
    IF ( _eff <= _sele && _exp > _sele, 1, 0 )

Capture.PNG

 

Please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

1. Create a date table and add the date column in slicer.

 

date = CALENDARAUTO()

2. Create a measure and make the table visual filtered by the measure.

 

Measure = 
VAR _exp =
    MAX ( Table1[expired date] )
VAR _eff =
    MAX ( Table1[effective date] )
VAR _sele =
    SELECTEDVALUE ( 'date'[Date] )
RETURN
    IF ( _eff <= _sele && _exp > _sele, 1, 0 )

Capture.PNG

 

Please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.