Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Date Range Slicer for Multi-Date Range

Problem: Create a Date Range Slicer that filters Job Sites based on, StartDate and EndDate range. IF the Date Range Slicer falls within the "StartDate/EndDate" range then we show the Job Site data....
  • v-kelly-msft's avatar
    5 years ago

    Hi  Anonymous ,

     

    Create a measure  as below:

    Show? = 
    var _mindate=MINX(ALLSELECTED('Table'),'Table'[Date Filter Range])
    var _maxdate=MAXX(ALLSELECTED('Table'),'Table'[Date Filter Range])
    Return
    IF((MAX('Table (2)'[End Date]) in FILTERS('Table'[Date Filter Range])&&MAX('Table (2)'[End Date])>=_mindate)||(MAX('Table (2)'[End Date])>=_maxdate&&MAX('Table (2)'[Start Date])<=_maxdate),"yes","no")

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!