cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Download: GitHub Link
Version: 1.0.0
Introduction
This article explains how to install the plug-in and how to interact with the configuration file.
Purpose/Benefits
This plug-in will change the current formula applied to widgets on a dashboard to a formula specified by the user. The user can also specify different formulas to apply to a widget depending on the user's group.
 
How To Install and Configure the Plug-In
Step 1 - Add The Plugin
Download the attachment and unzip the contents into your C:\Program Files\Sisense\PrismWeb\plugins\ folder. If you are using version 7.2 and higher unzip the contents into your C:\Program Files\Sisense\app\plugins\ folder. If the plugins folder doesn't exist, just create it. After those files have been unzipped there, you may also have to restart the web server.
Step 2 - Setup the Groups in the Config File
Within the plug-in folder ('dynamicFormulaChanger') open the 'config.js' file. Set the group name(s) to be effected by the plug-in under the 'groupName' variable as a string (do not include the [ ] characters). You may create and add multiple config objects into the config file, depending on the number of groups.
Step 3 - Setup the Formulas
In the 'config.js' file, under the 'formulas' field, specify the current formula being used by the widget(s) and the formula you would like to change it to. The format of the formula must include the aggregation type, table, and dimension being used. If there is no formula applied to the widget you may change the aggregation.
For proper formatting, please see the example below using 'sum', 'count', and 'Growth' aggregations along with an 'E Commerce' table as well as 'Revenue', 'Cost', and 'Brand ID' dimensions. Simple aggregations will be changed as well ('sum' to 'avg' and 'count' to 'countduplicates').
Step 4 - Apply the changes
You can apply the changes by simply refreshing the dashboard.
 
Notes (Version 1.0.0):
The formatting is case and symbol sensitive.
You do not have to use the same dimensions when specifying the formula you would like to change the current formula to.
You can not change a simple aggregation to a formula.
You can add multiple groups and formulas.
If multiple widgets share the same current formula, all the widgets will be changed to the user specified formula.
 
Formula Application Method:
The script loops through all the widgets in the dashboard -> loops through each panel in a widget -> loops through each item in a panel. Once in the item array it will search for the 'formula' and/or 'agg' fields. The current formulas dimension ID will be replaced with the table and dimension found in the context field. The new string will be matched with a configuration. Once a match is found within the configuration file, the new formula will be taken and the table will be replaced with the dimension ID before being passed into the prism object. The widget will then be refreshed to apply changes.
 
Release Notes:
18-July-2019: Initial Release
Rate this article:
Version history
Last update:
‎02-09-2024 11:45 AM
Updated by: