6 Replies Latest reply: Oct 13, 2016 6:14 AM by Shuhel Miah RSS

    Last x days filter not working

    Shuhel Miah

      I'm using the following query to generate a filter to restrict data to the selected number of days:


      IF(TODAY()-[Creation Date]<=1,'Last 1 day',
          IF(TODAY()-[Creation Date]<=3,'Last 3 days',
              IF(TODAY()-[Creation Date]<=7,'Last 7 days',
                  IF(TODAY()-[Creation Date]<=14,'Last 14 days',
                      IF(TODAY()-[Creation Date]<=30,'Last 30 days',


      However, it isn't performing as expected. For instance, if I select 'Last 7 days' it, only returns records between 3 to 7 days; I need to select the previous 2 selections to get the full 0 - 7 days I require.