1 Reply Latest reply on Oct 22, 2012 8:08 AM by Alex Kerin

    Hide Last Month in Trend Chart

    Ed Kukec

      Hi All,


      I have a trend line chart that graphs rates by Year/Month, ie Jan 2010, Feb 2010, Mar 2010, etc.  Each rate represents a month on the line chart.  The problem is, the last month, for reasons too long to explain but has to do with data availability and time lags, underestimates the rate so what I want to do is add some sort of a filter that always hides the last month in the line chart so you get a more consistent and smooth line as opposed to one where it suddently drops at the end.  For my line chart, the name of the column I'm using is  DISCH_MONTH, which is a date stamp.  The format of my column for the line chart is:




      Any help would be appreciated.




        • 1. Re: Hide Last Month in Trend Chart
          Alex Kerin

          You can't use a relative filter, because you can't exclude the latest month, only include it.


          Instead a calculation like


          if datediff('month',today(),[DISCH_MONTH])=0 then "latest" else "Not Latest" end


          used as a filter could work. It the latest month isn't classed as the same month as today, then you may have to use a table calc:


          if datediff('month',attr([DISCH_MONTH]),window_max(max[DISCH_MONTH))=0 then "latest" else "Not Latest" end


          You would have to check that for the right result - that will always scrub an entire month (not calendar month) off.


          To do calendar month, you would look to compare datetrunc('month',[DATES])...