ContributionsMost RecentNewest TopicsMost LikesSolutionsAmend a Granularity button to filter as well Good day all, Can someone please assist me with creating a custom action, I have tried everything but I cannot get it to work I have these date granularity buttons, But I need the button to affect the dashboard as well if a selection is made Here are my buttons { "style": "", "script": "", "title": "", "titleStyle": [ { "display": "none" } ], "showCarousel": true, "body": [], "actions": [ { "type": "dynamicGranSwap", "title": "Months", "style": { "background-color": "#1D426C" }, "data": { "widgetToModify": [ "65f1604d8f23ac0033253ddd" ], "filterJaql": { "explicit": true, "multiSelection": true, "members": [ "1" ] }, "dim": { "title": "Month_End", "table": "Calendar", "column": "Month_End", "datatype": "Int" } }, "dategran": "months" }, { "type": "dynamicGranSwap", "title": "Days", "style": { "background-color": "#D3D3D3" }, "data": { "widgetToModify": [ "65f1604d8f23ac0033253ddd" ] }, "dategran": "days" } ], "dateFilters": { "dim": { "title": "Month_End", "table": "Calendar", "column": "Month_End", "datatype": "Int" }, "title": "Month_End", "column": "Month_End", "table": "Calendar", "datatype": "Int", "level": "days", "filter": { "last": { "count": 8, "offset": 0 } } } } And here is the dynamicGranSwap Action // Holds the chosen granularity from the selected button 'months' for example const dategran = payload.dategran; const widgetIds = payload.data.widgetToModify; var filtername = "Month_End"; //Change the background color for unselected buttons payload.widget.style.currentCard.actions.forEach(function (i) { i.style["background-color"] = '#D3D3D3'; }); //Change the background color for selected buttons payload.widget.style.currentCard.actions .filter(i => i.dategran == dategran)[0].style["background-color"] = "#1D426C"; //Redraw the changes payload.widget.redraw(); //For each widget change the data granularity and update filter Jaql if widget has filter controls widgetIds.forEach(function (widgetId) { const widget = payload.widget.dashboard.widgets.$$widgets.find(widget => widget.oid === widgetId); if (widget) { // Change the level of granularity to the chosen value from our button: 'months' for example widget.metadata.panels[0].items[0].jaql.level = dategran; // Apply changes to Mongo widget.changesMade('someEvent', ['metadata', 'properties_changed']); // Refresh widget widget.refresh(); // Update filter Jaql if widget has filter controls const filterControl = widget.metadata.controls && widget.metadata.controls.find(control => control.type === "Filters"); if (filterControl && filterControl.data.filters && filterControl.data.filters.length > 0) { const filterJaql = filterControl.data.filters[0].filterJaql; if (filterJaql) { if (dategran === "months") { filterJaql.name = filterName; filterJaql.explicit = true; filterJaql.members = ["1"]; // Update members as needed } else if (dategran === "days") { filterJaql.name = filterName; filterJaql.explicit = false; filterJaql.multiSelection = true; filterJaql.all = true; } } } } }); And these are the filters, if Daily is selected: "filters": [ { "filterJaql": { "explicit": false, "multiSelection": true, "all": true }, "dim": { "title": "Month_End", "table": "Calendar", "column": "Month_End", "datatype": "Int" } } ] And this if Months are selected: "filters": [ { "filterJaql": { "explicit": true, "multiSelection": true, "members": [ "1" ] }, "dim": { "title": "Month_End", "table": "Calendar", "column": "Month_End", "datatype": "Int" } } ] Re: Breakby with multiple Values Seems like there are a tonne of HighChart Errors Re: Breakby with multiple Values Hi Benji_PaldiTeam, Thank you so much! Trying the script now and it just gives me a blank Graph? Anything I could be doing wrong Breakby with multiple Values Does anyone know how to have a breakby with two values in the Line chart? I found this community Plugin but its password protected https://community.sisense.com/t5/knowledge/second-value-to-cartesian-charts/ta-p/9129 Any help would be greatly appreciated harikm007 - Any ideas? Re-Order Pivot table Items Hi, I have a pivot table where there are various areas listed 1-15 but it will order it by the first number in the series ie. 1, 10, 11, 2 , 3 Is there a way around this so it will read 1, 2 , 3... 10 , 11 Mapbox GL not displaying Good Day, Can someone assist? I have installed the Mapbox GL widget (https://community-old.sisense.com/hc/en-us/community/posts/360001676433-Mapbox-GL-Widget) But it does not display anything, I have added the Mabbox API as per the original post but keeps displaying a grey box Any assistance would be greatly appreciated