Skip to Content
0
Jul 03 at 09:44 PM

How to add a column calculated in story using a code in the application in SAC

61 Views

Hello,
I'd like to add a computed column to a story using code (java script) in an analytics application.

my code:

var sel = Dropdown_1.getSelectedKey(); //202001
ConvertUtils.stringToInteger(sel);
var sel5 = ConvertUtils.stringToInteger(sel) - 100; //201901
ConvertUtils.numberToString(sel5);
console.log(sel);
Table_1.getDataSource().setDimensionFilter("Date", {values: [sel, ConvertUtils.numberToString(sel5),"new column"]});

"new column" - is the new computed column. After adding a column, I would like to write a formula on it (e.g. A = B)

Attachments