Auto Refresh Dashboard Based On Elasticube Build Or Refresh Every Dashboard Widget
Add this to a dashboard script: // Specify the required parameters var reloadType = 'page'; // 'dashboard' (dashboard refresh only) or 'page' (entire page reload) var checkInterval = 15; // checking interval in seconds //Variables + Settings to check elasticube build on the server var cubeName = dashboard.datasource.title; var encodedCubeName = encodeURIComponent(cubeName); var revision = null; var settings = { "async": true, "crossDomain": true, "url": "/api/v1/elasticubes/live/by_title/" + encodedCubeName, "method": "GET", "headers": { "Content-Type": "application/json" } } //The function to look up the revision history of the build. If the revision changes, a build had occurred and the auto-refresh is triggered function checkElasticubeBuildStatus(){ console.log("Checking cube status...") $.ajax(settings).done(function (response) { if(revision === null) { console.log("Initial dashboard load."); } else if(revision != response.lastBuildTime) { console.log("Cube has recently been updated. Reloading the dashboard..."); if(reloadType === 'page') { location.reload(); } else if (reloadType === 'dashboard') { dashboard.refresh(); } } else { console.log("Cube has not been updated."); } revision = response.lastBuildTime; console.log("Check completed. Next check in " + checkInterval + " seconds."); setTimeout(checkElasticubeBuildStatus, checkInterval*1000); }); } //Run the function to recursively check build status checkElasticubeBuildStatus(); Auto-refresh dashboard at a set interval: This script auto-refreshes the dashboard at a set interval. The example below is configured to refresh all widgets every 60 seconds. Add this to a dashboard script // Specify the required parameters var reloadType = 'dashboard'; // 'dashboard' (dashboard refresh only) or 'page' (entire page reload) var refreshInterval = 10; // refresh interval in seconds dashboard.on('initialized', function(dashboard, ev){ var refreshDashboard = function(){ if(reloadType === 'page') { location.reload(); } else if (reloadType === 'dashboard') { dashboard.refresh(); } setTimeout(refreshDashboard, refreshInterval*1000); } setTimeout(refreshDashboard, refreshInterval*1000); })1.2KViews0likes1CommentThe Smart Label
Download: Smart Label Introduction The following article describes steps needed to add to create smart text widget to present ElastiCube fields as text. Implementaion Steps Extract the folder in the attached zip file into \...\Sisense\PrismWeb\plugins. If you are using version 7.2 and higher unzip the contents into your C:\Program Files\Sisense\app\plugins\ folder. Create new widget and chose the smart label icon from the list Choose a field to present, set a design and hit "Apply" [Please note, that in case you have multiple values, it will present the first one. Therefore, it is always better to change the type of the filter to single value only, like in the given example] This plug in works on Version: L8.0.5.156. Only drop the plug in folder contained in the download folder into the plug ins folder in Sisense.1.5KViews0likes1CommentConditionally Hide Widgets
The example below uses a "peer group" use case, where a company which facilitates customer peer benchmarking, does not want users to compare themselves to fewer than 10 companies. The first widget, either an indicator or BloX widget, will supply the condition for the dashboard. When the value is lower than the user-set threshold, all other widgets get hidden. Base Configuration Open the Dashboard Script view and paste the following code inside. Edit the masterWidgetId and threshold variable in the following script: Dashboard Script Part 1: //----- Configuration ----------------------------------------------- let masterWidgetId = '<WidgetID here wrapped in single quotes>'; let threshold = <your integer threshold here>; //------------------------------------------------------------------------- HOW TO ACCESS THE WIDGETID You can access the ID by opening a widget's edit mode and taking the id after the widgets/ part inside the URL. URL: ...dashboards/<DashboardID>/widgets/<WidgetID>/ SETTING THE THRESHOLD If the value of the indicator or first value in the blox widget is less than the value of your threshold variable, then other widgets of the dashboard will be hidden. Completing The Script The next piece of the code depends on which widget type you use. You can use both Indicator and BloX widget types. Indicator Widget As Master Widget If your leading or Master widget is an indicator, paste the following code after the configuration code you pasted earlier. Dashboard Script Part 2a (for indicator) let isHidden = 0; dashboard.on('refreshend', (args, el) => { let masterWidget = args.widgets.$$widgets.find(w => w.oid === masterWidgetId); let logicValue = masterWidget.queryResult.value.data; if (logicValue < threshold){ $( 'widget' ).not( "[widgetid="+masterWidgetId+"]").slideUp(200); isHidden = 1; } else { if ( isHidden == 1){ $('widget').slideDown(200, ()=>{dashboard.refresh();}); isHidden = 0; } } }); BloX As Master Widget If your leading or Master widget is a BloX widget, paste the following code after the configuration code you pasted earlier. Dashboard Script Part 2b (for BloX) let isHidden = 0; dashboard.on('refreshend', (args, el) => { let masterWidget = args.widgets.$$widgets.find(w => w.oid === masterWidgetId); let logicValue = masterWidget.queryResult[0][0].Value; if (logicValue < threshold){ $( 'widget' ).not( "[widgetid="+masterWidgetId+"]").slideUp(200); isHidden = 1; } else { if ( isHidden == 1){ $('widget').slideDown(200, ()=>{dashboard.refresh();}); isHidden = 0; } } }); Now save the script and refresh the dashboard for the script to take effect. Enjoy!1.7KViews0likes1CommentPivot2: "Add Sparklines In Pivots" Re-Implemented
Introduction This plugin was created to allow dashboard designers to create sparklines within a pivot table. This plugin currently supports line, area, and column charts as the sparklines. Steps The following steps will walk through the process of adding the new plugin. STEP 1 - ADD THE PLUGIN Download the latest version of the plugin from this link and extract the enclosed folder into the plugins folder: /opt/sisense/storage/plugins/ STEP 2 - CREATE THE PIVOT FORMULA The main challenge with sparklines is that they require more data than just what's displayed in the pivot table. In order to specify the extra dimensions needed, you can create a multi-pass aggregation function that this plugin will use to generate a new query. The screenshots below show how to create a formula that includes the extra dimension needed to get supporting data used by the sparkline. Please note, you can use either a measure or starred formula for the last item in the sparkline formula. STEP 3 - DEFINE YOUR SPARKLINE Click on the settings menu of your formula, and then the sparkline option. You should see a menu listing the available chart types. If you change your formula, you must recheck the sparkline box. Also, you can set the color of the sparkline, similarly to how you would for any other value in the pivot table.1.7KViews0likes2CommentsIndicator With Dates, Time And Duration
Purpose/Benefits This plugin adds additional functionality on how one can display duration and date/time stamps in a Sisense indicator. Seconds to Duration takes the calculated integer and converts it to duration in hours, minutes, seconds, etc. Use Case: Say we are connecting to Salesforce, looking at leads, and wanting to display how long it took between the created date and the last modified date in time. This will allow you to display value in seconds as time(HH:MM, HH:MM.SS, etc). Integer to date converts a datetime integer value in the EC to display date and time in various formats. (can apply min/max formula to the integer) Use Case: I have a dashboard to analyze website performance and would like to display in an indicator the last value analyzed. The plugin would allow me to display the max time(latest value) in my desired date format (March 30 2017 3:03 PM) 1- Install 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. 2- Prepare Data Seconds to Duration: The formatting function will support any integer value. It could be a sum of seconds or Seconds difference between two date/time stamps. Integer to date: In the elasticube convert the Date/Time stamp to an integer date/time value. Please use the below function. 10000000000 * getyear([Date]) + 100000000 * getmonth([Date]) + getday([Date]) * 1000000 + gethour([Date]) * 10000 + getminute([Date]) * 100 + getsecond([Date]) 3- Choose format Create an indicator For Seconds to Duration calculate the seconds you would like to display with a formula In options menu select desired Format from the integer to date group. In options menu select desired Format from the seconds to duration group. For Integer to date apply min or max to the Integer as your formula. In options menu select desired Format from the integer to date group. References/Notes Many thanks to Aryeh, Tak and Ronen for the support in putting this together.2.2KViews0likes1CommentCustom Chart Options (Plugin To Easily Apply Highcharts Configuration Using Json)
Download: Custom Chart Options Version: 1.0.0 Created Oct-23-2019 by Steve Lewis (thanks to code re-used from Elliott Herz's Custom Bar/Column chart plugin) Current Version: V1.0.0 Tested on Sisense Version: V8.0.1.10112 Description: Sisense allows a certain level of chart customisation via the user interface out of the box. However, it's also possible to use the Highcharts API to make additional changes (For example, changing the background colour, axes etc.) through custom javascript via the 'edit script' panels of widgets. But - this requires some developer skills, and isn't so convenient for updating multiple properties at the same time. This plugin offers a user interface to be able to edit, preview and save a custom chart configuration (Json document) that follows the Highcharts API documentation It includes and uses an open source Json Editor Instructions: 1) Unzip contents and copy plugin folder to /<sisense_plugins_folder/customChartOptions (e.g. C:\Program Files\Sisense\app\plugins\customChartOptions on windows deployments) 2) Create/Edit a compatible widget (Bar, Column, Line, Area, Pie) 3) Activate "Custom Options" toggle on the Design Panel and click the 'Edit Custom Configuration' button. 4) Click the 'Example Config' and then 'Save & Preview' buttons to see an example of customising a chart. Use the Json Editor user interface and Highcharts API Documentation to customise the chart settings as desired. 5) Chart configuration is saved to each widget, and merged with the other chart options applied by Sisense as the chart is drawn. Therefore you only need to specify those things you want to change, not the entire chart options. Quick demo using the plugin: Limitations: 1) It's likely possible for some strange combinations e.g. choosing a bar chart in Sisense, then changing to a line chart via the custom options. 2) To be discovered2KViews1like3CommentsReverse Y-Axis Of A Chart
Paste the following code into the widget script to reverse the Y-Axis. Instead of the lower number at the bottom of the chart, it will be at the top. widget.on('processresult', function(se,ev){ ev.result.yAxis[0].reversed = true; }) If you have a secondary Y-Axis you can leave it as is or inverse it as well by adding the following line after line 2 of the code above. ev.result.yAxis[1].reversed = true;577Views0likes1CommentJumpToDashboard - Troubleshooting the most common configuration issues
JumpToDashboard - Troubleshooting the most common configuration issues This article provides possible solutions to the most common configuration issues with the JumpToDashboard plugin. Please review the symptom of the issue first (what error/behavior you experience with the JumpToDashboard plugin) and then follow the solution instructions. If this doesn’t solve your issue, feel free to contact our Support Team describing your issue in detail. Symptoms: A target (usually with “_drill” in prefix) dashboard disappeared for non-owner users in the left-hand side panel. Solution: this behavior could be intended and is controlled by the JumpToDashboard parameter called “hideDrilledDashboards”. To make the dashboard visible for the non-owners, please check the following: 1. Log in as a dashboard owner and find the dashboard in question in the left-hand side panel. Click the 3-dots menu and make sure it’s not hidden: 2. If it’s not hidden by the owner intentionally, then navigate to the Admin tab > System Management (under Server & Hardware) > File Management > plugins > jumpToDashboard > js > config.js and check if hideDrilledDashboards set to true. If so, then change it to false and save the changes in the config file. 3. Wait until the JumpToDashboard plugin is rebuilt under the Admin tab > Server & Hardware > Add-ons page and ask your user to refresh the browser page to check if a drill dashboard appears on the left-hand side panel. Symptoms: No "Jump to dashboard" menu appears in a widget edit mode clicking the 3-dots menu. Solution: there could be different reasons for such behavior so check the most common cases below: Double-check if the JumpToDashboard plugin is enabled under the Admin tab > Server & Hardware > Add-ons page. Make sure that both dashboards (parent and target) are based on the same ElastiCube. By default, the JumpToDashboard plugin has sameCubeRestriction: true in the config.js file that prevents the ‘jump to’ menu from appearing when a drill dashboard uses a different data source. Check that the prefix you used for the drill dashboard creation is correct. It could be changed in the config.js file. By default, it uses “_drill”: Symptoms: when clicking on a widget that should open a drill dashboard, nothing happens. Solution: in such cases, we recommend opening your browser console (for example, F12 for Chrome > Console tab) to see if there are any errors that could indicate the issue. For example, a 403 error in the console indicates that the target dashboard is not shared with the user who is experiencing the issue. To fix it, login as an owner of the drill dashboard and share it with the relevant user or group. Symptoms: when clicking on a widget to get the drill dashboard you get a 404 error. Solution: This issue usually happens when the target/drill dashboard is removed from the system. In order to fix it, please follow the steps below: Log in to the system as an owner. Find the parent widget and open it in edit mode. Click the 3 dots menu > choose the ‘Jump to dashboard’ menu and select any other dashboard that exists in the system. Press Apply and publish the changes to other users. Note: if you need just to remove a drill dashboard that doesn’t exist from this widget and not substitute it with another one, try the following: after you choose a new drill dashboard, just unselect it after that and then save the changes. If the jump to dashboard menu doesn’t appear for this widget, try to create a new temporary dashboard with “_drill” in the prefix and do the same. Symptoms: The drill dashboard is not opening for some viewers. Solution: republish the drill dashboard to make sure the updated version is delivered to all end users. Additional Resources: JumpToDashboard Plugin - How to Use and Customize1.5KViews1like2CommentsInclude All Dimension Values (Left Outer Join)
⬇️ Download using the attachment below ⬇️ Introduction A common requirement when performing grouping and aggregate operations, is to include all dimension values in the group irrespective of the contextual filters applied on the transaction table. e.g. For a given QTR show me a list of Customers and Total Sales - Including those Customers who have not made any purchases in the QTR. Installation and Setup Download the file from the link. UnZip it and place the OJ folder within the plugins folder of the file management UI. Admin > System Management > File Management > plugins You should now see the Include All Dimensions option in the widget properties menu for supported widgets. Note: It is recommended that you refresh the dashboard after enabling the plugin on any widget. Technical Details and Limitations Works on Sisense Linux 8.2.4.x onwards. Sisense Windows Not Supported. Works on Pivot / Column / Line Chart widget types only. Works with widgets based on both Live and Elasticube data models. Supports data security. Not conducive for pivots with more than 50,000 rows returned. Sort on measure option not supported. Subtotal and Grand Totals supported for summation rollups only. The plugin will respect any filter directly applied to the table of the Group field(s). Note: You may see the infamous yellow triangle after applying the plugin. - Refresh the dashboard to address this issue. For pivots returning a large number of records, you may see blank results followed by a widget refresh. This is due to the asynchronous nature of JAQL queries executing under the hood. If your widget has multi-level grouping with dimensions linked across a fact table. e.g. Customer > Orders > Sales Rep. Then the pivot will not display all the mathematical combinations but rather all combinations of Sales Rep and Customer in the Orders table.2.1KViews0likes4Comments