7 Replies Latest reply on Apr 4, 2018 7:26 AM by David Maning

    Conflict using continuous dates and date selection parameter

    Andy UK


      I want my dashboard to open up as default showing last week's data.


      I understand one of the ways I can do this is by creating a parameter and publishing to server.


      I've set up "Period Selection" parameter allowing users to select "last week", "last 2 weeks" and some other options, with the default set as "last week".


      This works great...


      If they want some other period, then they can enter a date range using the "range of dates" filter I've set up.


      The issue is that these are fighting against each other, so if for example, they select a range of dates in Jan 2018, then select "last week" no data shows unless they clear their filter first.


      Having to clear the filter first may confuse some of the users.


      Is there a way of eg using an action to clear the date range filter when the period selection is used?


      Or should I be approaching this differently?


      Many thanks





      IF [PeriodSelection] = "Last Week" THEN [Dates] >= dateadd('week',-1,Datetrunc('week', today()) ) and [Dates] < Datetrunc('week', today())



      ELSEIF [PeriodSelection] = "Last 2 Weeks" THEN [Dates] >= dateadd('week',-2,Datetrunc('week', today()) ) and [Dates] < Datetrunc('week', today())



      ELSEIF [PeriodSelection] = "This Week" THEN [Dates] >= dateadd('week',0,Datetrunc('week', today()) ) and [Dates] <= Datetrunc('day', today())