Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Get dimension values with getMembers?


I have a data source with the following dimensions in my SAP Design Studio dashboard:

Key 1 (String)

Key 2 (String)

Measure 1 (int)


Description 1



Description 2



Description 3



Description 4


I would really like to display the different keys in text fields because I am going to display the descriptions. After a heavy amount of searching online, I have come to an understanding that getting dimension values is quite difficult. (I am not trying to get the measure which easily can be obtained with the DS_1.getData() method)

A work around I have found is to use the following code:

var Dim_For_Description= DS_1.getMembers(Dimension, 100); 

Dim_For_Description.forEach(function(Dim_Desc, Dim_i) { 

if(Dim_i==1){Desc_1= Dim_Desc.internalKey;}

else if(Dim_i==2){Desc_2= Dim_Desc.internalKey;}

else if(Dim_i==3){Desc_3= Dim_Desc.internalKey;}

else if(Dim_i==4){Desc_4= Dim_Desc.internalKey;}

else if(Dim_i==5){Desc_5= Dim_Desc.internalKey;}

else if(Dim_i==6){Desc_6= Dim_Desc.internalKey;}

else if(Dim_i==7){Desc_7= Dim_Desc.internalKey;}

else if(Dim_i==8){Desc_8= Dim_Desc.internalKey;}

else if(Dim_i==9){Desc_9= Dim_Desc.internalKey;}

else if(Dim_i==10){Desc_10= Dim_Desc.internalKey;}


The problem is that the DS_1.getMembers() sorts the members alphabetically while I need them to be according to the sorting in the DS.

Is there any work-sround for this problem?

I am using Design Studio 4.1

Thank you.

Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question