on 09-11-2023 2:32 PM
Hi Folks,
Is there any way to add the created restricted measure on the column of the table using sac script on click action using dropdown values
Regards,
Thayu.
thayumanavan
thayumanavanAgain not sure of the use case. But you would need the ID of the restricted measures you created in the story and its not the name what you provide in calculation editor. You can get all the measures by below API
var sel =Table_4.getDataSource().getMeasures();
console.log(sel);
In my example I have created a restricted measure called "RM1", the id is shown as below.
Alternatively you can also find the id from Measure selector and switching the display to ID
To add the restricted measure to the column just use the below API. Make sure you have measures in column in initial table definition
Table_4.getDataSource().removeDimensionFilter(Alias.MeasureDimension);
Table_4.getDataSource().setDimensionFilter(Alias.MeasureDimension,"15076535-0910-4753-3381-832678712003");
Initial Table:
After button lick with the above API
You can use the same API on dropdown selection or any other Trigger.
Hope this helps
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 |
---|---|
76 | |
10 | |
8 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.