on 12-08-2012 1:31 PM
Can i add measures in my document just like i add dimensions using Script. I am not asking for initial view, i am referring to script where i could dynamically add any measure if i want to add or replace any measure using script.
Thanks
If you want to add a measures in your crosstab, you can use this :
DS_1.setFilter("Measures", "Technical name of your measure")
Regards,
Jonas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Faisal,
If you mean creating new key figures either in the datasource or for a crosstab / chart, no. Not yet.
But what you can do is read the data from a datasource, calculate something and put it into texts.
It's not the best way, but it works, especially for KPIs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I have the same need and issue.
From what I have found it does not seem to be supported. Even the filter components do not show available values/dimensions/measures. I hope SAP will support this soon!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alfred,
That did not work for me.
//clear dropdown filter
TILE_1_DROPDOWN.removeAllItems();
//filter to available items for tile
KPI_FILTERS.setFilterExt("tileOrderField",selectTile);
//populate
TILE_1_DROPDOWN.setItems(KPI_FILTERS.getMemberList
("filterField", MemberPresentation.INTERNAL_KEY ,MemberDisplay.TEXT, 100));
My issue here is that every time I tell it to getMemberList it looks at the entire dataset not the filtered dataset.
Hi Aharon,
Actually I am not sure what your question is. From your script, it seems to me the use case is different from the original post while my script is for the original question.
If you are seeking to have cascading filter, then you can set "Members for filtering" to "Only Values with posted data" in the Initial View.
I suggest you to open another thread if your need is not exactly the same as the original one.
Best regards,
Alfred
Hi Faisal,
You could also look at using an Analysis for Office View as a datasource. In the view you can add custom calculations and then set the hide / display properties in Design Studio.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Faisal,
If you want to add list of measures say in Dropdown box,you can do this as follows.
DROPDOWN_1.setItems(DS_1.getMemberList(
"[Measures]", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 10));
Rgds,Murali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Muralikrishnan,
I tried the code you wrote but it didn't work. This is the code I wrote:
DROPDOWN_2.setItems(DS_1.getMemberList("[Measures]", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 200));
Do you have any idea? I'd like to modify that code so I can get a list of dimension in a drop down. Is it possible?
Regards,
Marcello
You can do it, but the filter panel or the navigation area is here to take care of it.
OnStartup:
var arrayDims = DS_1.getDimensions();
arrayDims.forEach(function(element, index) {
if (!element.isMeasuresDimension) {
LISTBOX_1.addItem(element.name, element.name);
}
});
Initial View:
See, only 0D_NW_BP and some measures are used.
Application and the Dropdown contains all of the available dimensions:
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.