cancel
Showing results for 
Search instead for 
Did you mean: 

Populating values for Drop down in Financial Year format

afzal_kar
Active Participant
0 Kudos

I need to display financial Year in the drop down I,e (2017-18) format. for the backend we are using as BW.we are having Year and year month dimensions maintained in the backend.I tried several option but didn't get desired result set

MustafaBensan
Active Contributor
0 Kudos

Does the Year dimension in your BW system represent the Calendar Year or the Financial Year?

afzal_kar
Active Participant
0 Kudos

Dear Mustafa,

Thanks for updates.In the back end bex query Year column is present i,e 2017, 2016,205.....etc

MustafaBensan
Active Contributor
0 Kudos

Were you able to achieve the desired result?

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor
0 Kudos

Hi Afzal,

You can try the following code to achieve the desired result:

var myYears = DS_1.getMembers(<Year Dimension>, 10);
var yearText = "";
var yearNum = 0;

myYears.forEach(function(year, index) {

  yearNum = Convert.stringToInt(year.internalKey);  
  yearText = (yearNum - 1) + "-" + year.internalKey.substring(2);   
  DROPDOWN_1.addItem(yearNum + "", yearText); 
  
});

Regards,

Mustafa.

Answers (0)