The Switchable Dimensions add-on allows you to provide several views of your data.

With the Switchable Dimensions add-on, you can easily toggle between dimensions displayed in a widget.

The Switchable Dimension add-on can be set for categories, values, rows, columns or any other dimension that exists in a widget.

switching

To install the Switchable Dimensions add-on:

  1. Download the attachment and unzip the contents into your C:\Program Files\Sisense\PrismWeb\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.
  2. Create the widgets that will have switchable dimensions.
  3. Open the widgets script editor and paste the following code:
    editscript1

    prism.registerSwitchDimension({
    	widget: widget,
    	dimensions: [
    		{
    			//first field configuration
    			"index":0,
    			"panel": "<PANEL>",
    			"dim":"[<TABLE_NAME>.<FIELD_NAME>]",
                            "datatype": "<datatype>",
    			"title":"",// optional,
    			"widgetTitle":"" // optional
    		}
                    // **********duplicate this part for any additional field
    		,{
    			//second field configuration
    			"index":0,
    			"panel": "<PANEL>",
    			"dim":"[<TABLE_NAME>.<FIELD_NAME>]",
                            "datatype": "<datatype>",
    			"title":"", // optional,
    			"widgetTitle": "" // optional
    		}
    		//***********
    	]
    	
            });
  4. In the script pasted in the previous step, replace the following placeholders with the relevant values:
    “panel”: “<PANEL>” Define the panel name according to the switchable field’s location in the widget (the panels are located on the right side when editing a widget)
    “dim”:”[<TABLE_NAME>.<FIELD_NAME>]” Enter the table and field name.
    “datatype”: Dimension data type. It’s important to set correct the datatype. Allowed datatypes include “datetime”, “text”, “numeric”.
    “title”:”<TITLE>” Edit  the title of the field. This is displayed when right-clicking to switch dimensions.
    “widgetTitle”: “<WIDGET TITLE>” Edit  the widget’s title (optional field).
  5. Click Apply to save your changes and refresh the dashboard to display your switchable options.