Skip to Content

PAst 12 months in design stduio for chart version 2.1

Apr 25 at 12:04 AM


avatar image
Former Member


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



10 |10000 characters needed characters left characters exceeded

What is your data source and what do the internal key values of your Calendar Year Month dimension look like?

* Please Login or Register to Answer, Follow or Comment.

1 Answer

Christian Hauswald Apr 25 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...

10 |10000 characters needed characters left characters exceeded