Forum Discussion

LotteLaugesen's avatar
4 years ago
Solved

Dynamic filter depending on another filter

Hi 

 

I would like to have a date filter showing the last 7 or 14 days depending on another filter like this:

Is it possible?

 

BR

Lotte

  • I have find a way to solve it 🙂

    Include Date = IF(SELECTEDVALUE(Weeks[Weeks]) = 1 && SELECTEDVALUE(Dim_Calendar[IndexDay]) < 7,1,IF(SELECTEDVALUE(Weeks[Weeks]) = 2 && SELECTEDVALUE(Dim_Calendar[IndexDay]) < 14,1,0))
     
    Where IndexDay is days from today
    and then I just put a filter on Date slicer saying that Include Date should be 1

     

3 Replies

  • I have find a way to solve it 🙂

    Include Date = IF(SELECTEDVALUE(Weeks[Weeks]) = 1 && SELECTEDVALUE(Dim_Calendar[IndexDay]) < 7,1,IF(SELECTEDVALUE(Weeks[Weeks]) = 2 && SELECTEDVALUE(Dim_Calendar[IndexDay]) < 14,1,0))
     
    Where IndexDay is days from today
    and then I just put a filter on Date slicer saying that Include Date should be 1

     
  • LotteLaugesen , Create a measure

     

    countrows(filter('Date', Date[Date] <= Today()  && Date[Date] >= Today() - (selectedvalue(Table[Number])*7) ))

     

    and check the values is not blank in the visual level filter of the slicer

    • LotteLaugesen's avatar
      LotteLaugesen
      Helper V

      Hi amitchandak

       

      It doesn't seem to work - it doesn't matter if I select 1 or 2 week the measure is 1. 
      If it worked how could I then use it as a filter for the date slicer?