Forum Discussion

lharrison's avatar
lharrison
Cloud Apps
04-04-2022
Solved

Year-To-Date for Only Completed Months

Hello,

I have a pivot table where I am calculating YTD vs. LYTD metrics by month, like this:

I want to exclude April from this table as it is not a completed month and thus doesn't provide useful information. I can't figure out how to do that from the filters pane and haven't had any luck with scripts either. Does anyone have any ideas?

  • Hello

    I would suggest adding a new custom column called, say, "YTD", set to "Y" or "N" based on whether the date/timestamp column you are using is the same year as today but not the same month as today

    Regards,

    Bob

3 Replies

Replies have been turned off for this discussion
  • BobF's avatar
    BobF
    Data Storage

    Hello

    I would suggest adding a new custom column called, say, "YTD", set to "Y" or "N" based on whether the date/timestamp column you are using is the same year as today but not the same month as today

    Regards,

    Bob

  • Ramon_Lopez's avatar
    Ramon_Lopez
    Sisense Employee

    Hi all!

    Agreed with bob - this could be done with a custom column.  Here is an example of YTD.

    Cheers!

    Ramon Lopez

     

     

     

    • ascott011's avatar
      ascott011
      Cloud Apps

      Hi Ramon,

      Would you know how to do this on a live model? The getmonth and getyear functions are only for elasticubes I believe.

      Thanks, Alex