cancel
Showing results for 
Search instead for 
Did you mean: 

How get Measures of new Model with Account and Measures in Analytical application.

TanyaDabravolsk
Explorer
0 Kudos

We have used new model with both the account and measures. Here is the structure:

In analytical application the chart in designed and it is needed to change measures dynamically using dropdown list. The problem is that API’s allow only to get Account information and apply it to chart. But there is no API to get measures of model to use it within the script.

Here is information how getMembers() works. Method getMeasures() returns accounts instead of measures as well.

Could you please advise on how to get Measures information in Analytical application for the new model with Account and Measures.

Accepted Solutions (0)

Answers (4)

Answers (4)

TanyaDabravolsk
Explorer
0 Kudos

Actually, input control does not solve the problem as second step - assign new value to measure is failed due to the fact that system expect account member is to be assigned in code instead of new measure

for(var i=0; i<selectedIds.length;i++){

planChart.addMeasure(selectedIds[i],Feed.ValueAxis);

}

It is the error message

So ,it looks like there is no API to set new measure to chart.

N1kh1l
Active Contributor
0 Kudos

tatsiana_dabravolskaya

If your idea is just to pass the measures from dropdown to the chart, you can also use a Measure Input control


You are right currently most API's are returning Accounts instead of measures. Alternatively you could all those measure of interest into a hidden Table and read them through API.

Br.

Nikhil

TanyaDabravolsk
Explorer
0 Kudos

Thanks Nikhil,

however the problem is a bit different and lies in chart for new model with account and measure. My goal is to get Measure Flow Changing FX variable and replace it dynamically. A used code CurrentMeasureFilterSelection = planChart.getMembers(Feed.ValueAxis) and it returned account instead (as per description of this method it is expected). I have tried all other available method and have not got measure for this scenario. So. I am wondering whether it is possible?

N1kh1l
Active Contributor
0 Kudos

tatsiana_dabravolskaya

tatsiana_dabravolskayaThe below API returns the measures of the model with both Accounts and Measures. If you have chart then it would return both Accounts and Measures which will make your list lengthy. Another approach could be to use a hidden table. Add a table with all measures in rows and version on column. Keep the table as unbooked. You can use the API below to get a list of all measures but hide the table in the outline view.

var measures = Table_1.getDataSource().getMeasures();
console.log(measures);

Output:

Br.

Nikhil