Forum Discussion

spencer_g's avatar
spencer_g
Helper I
9 years ago
Solved

Filter Page to Exclude Current Month

Hi everyone and thanks in advance. 

 

I have 3 years-worth of data that is continually being added to on a daily basis. At the end of each month I generate a report comparing that month and all months prior, however, I don't generate the report until a few days into the new month and then the line graphs in the report show data for the new month and I don't want to show any data for the month on this report. I want to be able to filter the entire page to exclude the current month. Does anyone know how to do this? 

 

Thanks in advance!

  • One way would be to do something like this:

     

    IsCurrentMonth = IF(MONTH([Date]) = MONTH(TODAY()),1,0)

    Then just filter the page with IsCurrentMonth set to equal 0 only.

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    One way would be to do something like this:

     

    IsCurrentMonth = IF(MONTH([Date]) = MONTH(TODAY()),1,0)

    Then just filter the page with IsCurrentMonth set to equal 0 only.

    • spencer_g's avatar
      spencer_g
      Helper I

      Thanks smoupre!

       

      Since I have multiple years worth of data, I had to make one small edition so it ended up looking like:

       

      IF(MONTH([Date]) = MONTH(TODAY()) && YEAR([Date]) = YEAR(TODAY()), 1, 0)

       

      But otherwise your formula worked like a charm. 

       

      Thanks again.

  • You can filter on calendermonth using relative date: this excludes the current month from the data shown: 

    The same is possible for years and weeks!

     

  • Do you need to setup a measure for Date first? How would you do it? Whenever I use [...] it only shows measures I have setup, it never shows the Date column in my Date table.