Skip to Content
0

PAst 12 months in design stduio for chart version 2.1

Apr 25 at 12:04 AM

23

avatar image
Former Member

HI,

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

Thanks,

Varun

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?

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

1 Answer

Christian Hauswald Apr 25 at 07:05 AM
0

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...

Share
10 |10000 characters needed characters left characters exceeded