on 2022 Apr 21 6:16 PM
Hi All,
I have been searching, on every page and every pdf of documentation but I have not been able to get the values of a measure.
That is, I have a table with different measurements, and I need to extract the values of one of its columns and send it to an array, so that when printing the result on the console it says something like:
0: 123456
1: 212345
2: 312345
3: 412345
4: 512345
or well, something similar but only with the values, no description, id or parentId
I hope you can help me, thanks
Request clarification before answering.
Using a table with 1 dimension & 1 measure this seems to work
var arr = Table_1.getDataSource().getResultSet();
var value = ArrayUtils.create(Type.number);
for (var i=0;i<arr.length;i++)
{var string = arr[i][Alias.MeasureDimension].formattedValue;
var number = ConvertUtils.stringToNumber(string);
value.push(number);}
console.log(value);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi James,
First of all thank you for your response , it was really helpful while trying to implement a usecase in the optimized story.
My question is, can I create measures through scripting by accessing each values from the result set or change the description of calculated measures through scripting
User | Count |
---|---|
52 | |
6 | |
6 | |
6 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.