Skip to Content

PAst 12 months in design stduio for chart version 2.1


I have searched couple of posts to display last 12 months in design studio for chart i didnt get any solution could any one help me

i have cal year month (SEPT 2016,DEC2016 ......)

want to filter this dimension to filter last 12 months .due to some restrictions we cant do in backend

any help would be helpful



Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Apr 25, 2018 at 07:05 AM

    Hey Varun,

    with the Command APPLICATION.getInfo().dateNowInternalFormat you will get the current date out of the application.
    Example: var datenow = APPLICATION.getInfo().dateNowInternalFormat;

    with the Command "substring" you can split it by year and month
    Example: var year = datenow.substring(0,4);

    Afterwards you have the current month, and the current year within a variable and you can do skripting, saying something like:
    startdate = the curretndate - 12 month (you have to think of the year-change)

    And in the end, you can set these values to your datasource...

    Add comment
    10|10000 characters needed characters exceeded