{ "title": "MoM Selector - Measured Value Filter - BloX", "desc": "", "source": null, "type": "dashboard", "style": { "palette": { "name": "Sift", "colors": [ "#1a95c3", "#081336", "#666666", "#000000", "#c6d9e7", "#bf531d" ] } }, "layout": { "instanceid": "57CD6-7F1D-6A", "type": "columnar", "columns": [ { "width": 100, "cells": [ { "subcells": [ { "elements": [ { "minHeight": 64, "maxHeight": 2048, "minWidth": 64, "maxWidth": 2048, "height": "48px", "defaultWidth": 128, "widgetid": "665eab81bb032e0034ea2810" } ], "width": 100, "stretchable": false, "pxlWidth": 1535, "index": 0 } ] }, { "subcells": [ { "elements": [ { "minHeight": 68, "maxHeight": 934, "minWidth": 128, "maxWidth": 2048, "height": "284px", "defaultWidth": 512, "widgetid": "665eab81bb032e0034ea2812" } ], "width": 44.197359277275886, "stretchable": false, "pxlWidth": 678.417, "index": 0 }, { "elements": [ { "minHeight": 64, "maxHeight": 1028, "height": "284px", "minWidth": 48, "maxWidth": 1028, "defaultWidth": 512, "widgetid": "665eab81bb032e0034ea2811" } ], "width": 55.802640722724114, "stretchable": false, "pxlWidth": 856.562, "index": 1 } ] } ], "pxlWidth": 1535, "index": 0 } ], "container": {} }, "original": null, "previewLayout": [], "dataExploration": false, "lastOpened": null, "oid": "665eab81bb032e0034ea280f", "datasource": { "address": "LocalHost", "title": "MoM Compare BloX", "id": "localhost_aMoMIAAaCompareIAAaBloX", "database": "aMoMIAAaCompareIAAaBloX", "fullname": "localhost/MoM Compare BloX", "live": false }, "filters": [], "editing": true, "settings": { "autoUpdateOnFiltersChange": true, "useAcceleration": false }, "filterRelations": [], "filterToDatasourceMapping": {}, "script": "/*\nWelcome to your Dashboard's Script.\n\nTo learn how you can access the Widget and Dashboard objects, see the online documentation at https://sisense.dev/guides/js/extensions\n*/\n\n", "allowChangeSubscription": false, "isPublic": null, "parentFolder": "665eab79bb032e0034ea280c", "autoUpdateOnFiltersChange": true, "useAcceleration": false, "widgets": [ { "title": "RICHTEXT_MAIN.TITLE", "type": "richtexteditor", "subtype": "richtexteditor", "oid": "665eab81bb032e0034ea2810", "desc": null, "source": null, "datasource": { "address": "LocalHost", "title": "MoM Compare BloX", "id": "localhost_aMoMIAAaCompareIAAaBloX", "database": "aMoMIAAaCompareIAAaBloX", "fullname": "localhost/MoM Compare BloX", "live": false }, "selection": null, "metadata": { "ignore": { "dimensions": [], "ids": [], "all": false }, "panels": [], "usedFormulasMapping": {} }, "style": { "content": { "html": "Engagement Rate - MoM Compare
", "vAlign": "valign-middle", "bgColor": "#167da4", "textAlign": "center" } }, "instanceid": "6626C-5CCE-07", "wasRendered": false, "realTimeRefreshing": false, "options": { "triggersDomready": true, "hideFromWidgetList": true, "disableExportToCSV": true, "disableExportToImage": true, "toolbarButton": { "css": "add-rich-text", "tooltip": "RICHTEXT_MAIN.TOOLBAR_BUTTON" }, "selector": false, "disallowSelector": true, "disallowWidgetTitle": true, "supportsHierarchies": false, "dashboardFiltersMode": "filter" }, "dashboardid": "665eab81bb032e0034ea280f", "lastOpened": null }, { "title": "", "type": "BloX", "subtype": "BloX", "oid": "665eab81bb032e0034ea2811", "desc": null, "source": null, "datasource": { "address": "LocalHost", "title": "MoM Compare BloX", "id": "localhost_aMoMIAAaCompareIAAaBloX", "database": "aMoMIAAaCompareIAAaBloX", "fullname": "localhost/MoM Compare BloX", "live": false }, "selection": null, "metadata": { "ignore": { "dimensions": [], "ids": [], "all": false }, "panels": [ { "name": "Items", "items": [] }, { "name": "Values", "items": [ { "jaql": { "type": "measure", "formula": "(\n (\n ([FC049-08B],[4ACDA-55E]) / ([DA86C-601],[4ACDA-55E])\n ) - \n (\n ([FC049-08B],[9C802-46E]) / ([DA86C-601],[9C802-46E])\n )\n) ", "context": { "[9C802-46E]": { "table": "fact_clicks", "column": "event_date_compare", "dim": "[fact_clicks.event_date_compare (Calendar)]", "datatype": "datetime", "merged": true, "level": "months", "title": "Months in event_date_compare", "datasource": { "address": "LocalHost", "title": "MoM Compare BloX", "id": "localhost_aMoMIAAaCompareIAAaBloX", "database": "aMoMIAAaCompareIAAaBloX", "fullname": "localhost/MoM Compare BloX", "live": false }, "firstday": "mon", "locale": "en-us", "filter": { "explicit": true, "multiSelection": true, "members": [ "2020-01-01T00:00:00" ] } }, "[4ACDA-55E]": { "table": "fact_clicks", "column": "event_date", "dim": "[fact_clicks.event_date (Calendar)]", "datatype": "datetime", "merged": true, "level": "months", "title": "Months in event_date", "datasource": { "address": "LocalHost", "title": "MoM Compare BloX", "id": "localhost_aMoMIAAaCompareIAAaBloX", "database": "aMoMIAAaCompareIAAaBloX", "fullname": "localhost/MoM Compare BloX", "live": false }, "firstday": "mon", "locale": "en-us", "filter": { "explicit": true, "multiSelection": true, "members": [ "2021-06-01T00:00:00" ] } }, "[FC049-08B]": { "table": "fact_clicks", "column": "engaged_clicks", "dim": "[fact_clicks.engaged_clicks]", "datatype": "numeric", "agg": "sum", "title": "Total engaged_clicks" }, "[DA86C-601]": { "table": "fact_clicks", "column": "all_clicks", "dim": "[fact_clicks.all_clicks]", "datatype": "numeric", "agg": "sum", "title": "Total all_clicks" } }, "title": "% Change" }, "instanceid": "17070-2B10-77", "format": { "mask": { "decimals": 2, "percent": true } }, "PanelName": "% Change" } ] }, { "name": "filters", "items": [] } ], "usedFormulasMapping": {} }, "style": { "currentCard": { "style": "", "script": "", "title": "", "showCarousel": true, "conditions": [ { "minRange": "-Infinity", "maxRange": 0, "color": "#54a254" }, { "minRange": 0, "maxRange": "Infinity", "color": "#FA5656" } ], "body": [ { "spacing": "default", "type": "Container", "items": [ { "spacing": "", "type": "TextBlock", "text": "Engagement Rate - % Change", "weight": "bold", "color": "default", "size": "large", "horizontalAlignment": "center" }, { "type": "TextBlock", "class": "condition_data engagement_rate", "text": "{panel: % Change}", "horizontalAlignment": "center", "size": "extraLarge", "style": { "color": "#117899" } }, { "type": "TextBlock", "id": "blox_text", "class": "blox_text", "text": "Comparing 2021-06 vs 2020-01", "horizontalAlignment": "center", "size": "medium", "weight": "", "color": "black", "style": { "margin-top": "2px", "font-style": "italic" } } ] } ], "actions": [] }, "currentConfig": { "fontFamily": "Open Sans", "fontSizes": { "default": 16, "small": 14, "medium": 16, "large": 25, "extraLarge": 60 }, "fontWeights": { "default": 500, "light": 100, "bold": 1000 }, "containerStyles": { "default": { "backgroundColor": "#ffff", "foregroundColors": { "default": { "normal": "#3A4356" }, "white": { "normal": "#ffff" }, "grey": { "normal": "#5C6372" }, "orange": { "normal": "#f2B900" }, "yellow": { "normal": "#ffcb05" }, "black": { "normal": "#000000" }, "lightGreen": { "normal": "#3ADCCA" }, "green": { "normal": "#54a254" }, "red": { "normal": "#dd1111" }, "accent": { "normal": "#2E89FC" }, "good": { "normal": "#54a254" }, "warning": { "normal": "#e69500" }, "attention": { "normal": "#cc3300" } } } }, "imageSizes": { "default": 40, "small": 40, "medium": 80, "large": 160 }, "imageSet": { "imageSize": "medium", "maxImageHeight": 100 }, "actions": { "color": "", "backgroundColor": "", "maxActions": 5, "spacing": "extraLarge", "buttonSpacing": 20, "actionsOrientation": "horizontal", "actionAlignment": "center", "showCard": { "actionMode": "inline", "inlineTopMargin": 16, "style": "default" } }, "spacing": { "default": 5, "small": 20, "medium": 40, "large": 60, "extraLarge": 40, "padding": 25 }, "separator": { "lineThickness": 1, "lineColor": "#eeeeee" }, "factSet": { "title": { "size": "default", "color": "default", "weight": "bold", "warp": true }, "value": { "size": "default", "color": "default", "weight": "default", "warp": true }, "spacing": 20 }, "supportsInteractivity": true, "imageBaseUrl": "" }, "currentCardName": "momCompareDsply", "narration": { "enabled": false, "display": "above", "format": "bullets", "verbosity": "medium", "up_sentiment": "good", "aggregation": "sum", "labels": [] } }, "instanceid": "7682A-09B7-65", "useId": "3290F-B705-69D9-A868", "psData": {}, "wasRendered": false, "drillToDashboardConfig": { "drilledDashboardPrefix": "_drill", "drilledDashboardsFolderPrefix": "", "displayFilterPane": true, "displayDashboardsPane": true, "displayToolbarRow": true, "displayHeaderRow": true, "volatile": false, "hideDrilledDashboards": true, "hideSharedDashboardsForNonOwner": true, "drillToDashboardMenuCaption": "Jump to dashboard", "drillToDashboardRightMenuCaption": "Jump to ", "drillToDashboardNavigateType": 4, "drillToDashboardNavigateTypePivot": 2, "drillToDashboardNavigateTypeCharts": 1, "drillToDashboardNavigateTypeOthers": 3, "excludeFilterDims": [], "includeFilterDims": [], "drilledDashboardDisplayType": 2, "dashboardIds": [], "modalWindowResize": false, "showFolderNameOnMenuSelection": false, "resetDashFiltersAfterJTD": false, "sameCubeRestriction": true, "showJTDIcon": true, "sendPieChartMeasureFiltersOnClick": true, "forceZeroInsteadNull": false, "mergeTargetDashboardFilters": false, "drillToDashboardByName": false, "sendBreakByValueFilter": true, "ignoreFiltersSource": false }, "realTimeRefreshing": false, "options": { "dashboardFiltersMode": "select", "selector": true, "title": false, "drillTarget": "dummy", "triggersDomready": true, "autoUpdateOnEveryChange": true }, "dashboardid": "665eab81bb032e0034ea280f", "drilledDashboardDisplay": {}, "lastOpened": null }, { "title": "", "type": "BloX", "subtype": "BloX", "oid": "665eab81bb032e0034ea2812", "desc": null, "source": null, "datasource": { "address": "LocalHost", "title": "MoM Compare BloX", "id": "localhost_aMoMIAAaCompareIAAaBloX", "database": "aMoMIAAaCompareIAAaBloX", "fullname": "localhost/MoM Compare BloX", "live": false }, "selection": null, "metadata": { "ignore": { "dimensions": [], "ids": [], "all": true }, "panels": [ { "name": "Items", "items": [ { "jaql": { "table": "fact_clicks", "column": "event_date_compare", "dim": "[fact_clicks.event_date_compare (Calendar)]", "datatype": "datetime", "merged": true, "level": "months", "title": "monthCompare" }, "instanceid": "A7CD5-6C7E-46", "PanelName": "monthCompare", "format": { "mask": { "years": "yyyy", "quarters": "yyyy Q", "months": "yyyy-MM", "weeks": "ww yyyy", "days": "shortDate", "minutes": "HH:mm", "dateAndTime": "MM/dd/yyyy HH:mm" } }, "hierarchies": [ "calendar" ] }, { "jaql": { "table": "fact_clicks", "column": "event_date", "dim": "[fact_clicks.event_date (Calendar)]", "datatype": "datetime", "merged": true, "level": "months", "title": "month" }, "instanceid": "7CC23-BB12-3D", "PanelName": "month", "format": { "mask": { "years": "yyyy", "quarters": "yyyy Q", "months": "yyyy-MM", "weeks": "ww yyyy", "days": "shortDate", "minutes": "HH:mm", "dateAndTime": "MM/dd/yyyy HH:mm" } }, "hierarchies": [ "calendar", "calendar - weeks" ] } ] }, { "name": "Values", "items": [] }, { "name": "filters", "items": [] } ], "usedFormulasMapping": {} }, "style": { "currentCard": { "style": "", "script": "", "title": "", "showCarousel": true, "carouselAnimation": { "delay": 0, "showButtons": false }, "body": [ { "type": "Container", "style": { "justify-items": "left", "align-items": "left" }, "items": [ { "type": "TextBlock", "spacing": "default", "size": "small", "text": "Choose Comparitive TimePeriods", "style": { "text-align": "left", "font-weight": "600", "margin-left": "10px" } }, { "type": "ColumnSet", "columns": [ { "type": "Column", "width": "50%", "spacing": "large", "items": [ { "type": "Input.ChoiceSet", "id": "monthCompare", "class": "blox-dropdown-m1", "width": "150px", "displayType": "compact", "style": { "align-self": "center" }, "choices": "{choices:monthCompare}" } ] }, { "type": "Column", "width": "50%", "spacing": "large", "items": [ { "type": "Input.ChoiceSet", "id": "month", "class": "blox-dropdown-m2", "width": "150px", "displayType": "compact", "style": { "align-self": "center" }, "choices": "{choices:month}" } ] } ] } ] }, { "type": "Container", "spacing": "large", "style": { "justify-items": "center", "align-items": "center", "padding-left": "30px" }, "items": [ { "type": "ActionSet", "actions": [ { "type": "momRateCompare", "id": "momRateCompare", "title": "Apply", "style": { "font-size": "13.01px" }, "data": { "monthField": "event_date", "monthCompareField": "event_date_compare", "widgetToModify": [ "665eab81bb032e0034ea2811" ] } } ] } ] } ], "actions": [] }, "currentConfig": { "fontFamily": "Open Sans", "fontSizes": { "default": 14, "small": 16, "medium": 20, "large": 24, "extraLarge": 40 }, "fontWeights": { "default": 500, "light": 100, "bold": 1000 }, "containerStyles": { "default": { "backgroundColor": "#ffffff", "foregroundColors": { "default": { "normal": "#5B6372" }, "white": { "normal": "#ffffff" }, "grey": { "normal": "#5C6372" }, "orange": { "normal": "#f2B900" }, "yellow": { "normal": "#ffcb05" }, "black": { "normal": "#000000" }, "lightGreen": { "normal": "#3ADCCA" }, "green": { "normal": "#54a254" }, "red": { "normal": "#dd1111" }, "accent": { "normal": "#2E89FC" }, "good": { "normal": "#54a254" }, "warning": { "normal": "#e69500" }, "attention": { "normal": "#cc3300" } } } }, "imageSizes": { "default": 40, "small": 40, "medium": 80, "large": 160 }, "imageSet": { "imageSize": "medium", "maxImageHeight": 100 }, "actions": { "color": "", "backgroundColor": "", "maxActions": 5, "spacing": "small", "buttonSpacing": 10, "actionsOrientation": "horizontal", "actionAlignment": "center", "showCard": { "actionMode": "inline", "inlineTopMargin": 16, "style": "default" } }, "spacing": { "default": 5, "small": 10, "medium": 25, "large": 40, "extraLarge": 50, "padding": 0 }, "separator": { "lineThickness": 1, "lineColor": "#eeeeee" }, "factSet": { "title": { "size": "default", "color": "default", "weight": "bold", "warp": true }, "value": { "size": "default", "color": "default", "weight": "default", "warp": true }, "spacing": 20 }, "supportsInteractivity": true, "imageBaseUrl": "" }, "currentCardName": "On The Go", "narration": { "enabled": false, "display": "above", "format": "bullets", "verbosity": "medium", "up_sentiment": "good", "aggregation": "sum", "labels": [ { "id": "monthcompare", "title": "monthCompare", "singular": "monthCompare", "plural": "monthCompare" }, { "id": "month", "title": "month", "singular": "month", "plural": "month" } ] } }, "instanceid": "FBE93-C2B4-26", "useId": "139A8-D30A-5D50-63BA", "psData": {}, "wasRendered": false, "drillToDashboardConfig": { "drilledDashboardPrefix": "_drill", "drilledDashboardsFolderPrefix": "", "displayFilterPane": true, "displayDashboardsPane": true, "displayToolbarRow": true, "displayHeaderRow": true, "volatile": false, "hideDrilledDashboards": true, "hideSharedDashboardsForNonOwner": true, "drillToDashboardMenuCaption": "Jump to dashboard", "drillToDashboardRightMenuCaption": "Jump to ", "drillToDashboardNavigateType": 4, "drillToDashboardNavigateTypePivot": 2, "drillToDashboardNavigateTypeCharts": 1, "drillToDashboardNavigateTypeOthers": 3, "excludeFilterDims": [], "includeFilterDims": [], "drilledDashboardDisplayType": 2, "dashboardIds": [], "modalWindowResize": false, "showFolderNameOnMenuSelection": false, "resetDashFiltersAfterJTD": false, "sameCubeRestriction": true, "showJTDIcon": true, "sendPieChartMeasureFiltersOnClick": true, "forceZeroInsteadNull": false, "mergeTargetDashboardFilters": false, "drillToDashboardByName": false, "sendBreakByValueFilter": true, "ignoreFiltersSource": false }, "drilledDashboardDisplay": {}, "realTimeRefreshing": false, "options": { "dashboardFiltersMode": "select", "selector": true, "title": false, "drillTarget": "dummy", "triggersDomready": true, "autoUpdateOnEveryChange": true }, "dashboardid": "665eab81bb032e0034ea280f", "viewState": { "activeTab": "design" }, "script": "/*\nWelcome to your Widget's Script.\n\nTo learn how you can access the Widget and Dashboard objects, see the online documentation at https://sisense.dev/guides/js/extensions\n*/\n\nwidget.on('ready',function(el,args){\n\tif($(\"#triggered_at\").val() === $(\"#triggered_at_compare\").val()){\n\t\t//Get Current Date and then extract the YYYY-MM of that\n\t\tvar currentDateM = moment();\n\t\tvar currentDate = currentDateM.format('YYYY-MM-DD');\n\t\tvar currMonth = currentDate.substr(0,7);\n\n\t\t// Get 2-Year Prior Date and then extract the YYYY-MM of that\n\t\tvar p2yDateM = moment().subtract(2, 'years');\n\t\tvar p2yDate = p2yDateM.format('YYYY-MM-DD');\n\t\tvar p2yMonth = p2yDate.substr(0,7);\n\n\t\t// Get 3-Year Prior Date and then extract the YYYY-MM of that\n\t\tvar p3yDateM = moment().subtract(3, 'years');\n\t\tvar p3yDate = p3yDateM.format('YYYY-MM-DD');\n\t\tvar p3yMonth = p3yDate.substr(0,7);\n\n\n\t\t//Setting the Months to dropdown value and simulating a click \n\t\t//Temp setting to compare p2yMonth vs p3yMonth. Change it to currMonth vs p2yMonth after you have full data\n\t\t$(\"#triggered_at\").val(p2yMonth);\n\t\t$(\"#triggered_at_compare\").val(p3yMonth);\n\t\t\n\t\t//Clicking the button with the style element { \"font-size\": \"13.01px\" } which was specifically mentioned inside BloX Editor to assign a tag to the button\n\t\t//(this is useful when using the same BloX widget twice in a dashbaord)\n\t\t$('button[style*=\"font-size: 13.01px\"]')[0].click();\n\t}\n})\n\n", "lastOpened": null } ], "hierarchies": [] }