on 2023 Nov 11 11:31 AM
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.
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.