Is it possible to dynamically change the data model for an accrd or drill dashboard
Summary: Rose Holmes-Minton, Rose Holmes-Minton, created an Accordion and Drill dashboard to test Sisense features, but faced issues with dynamically changing the data model. Piotr_qbeeq, Piotr from QBeeQ, explained that dashboards are tied to specific data models, and advised restructuring architecture or merging data into a single model. Rose found a solution using Dynamic Elasticube and accordion plugins. She shared detailed instructions from Sisense Support for modifying the plugin JavaScript to switch data models dynamically. Piotr sought clarification on the setup, suggesting alternatives with shared models or routing users to appropriate dashboards.
I created a Accordion dashboard and a Drill dashboard to test the Accordion and Jumpto Sisense features.
The features work well as long as the data model for the Accordion dashboard and the main dashboard are the same. However, when I change the data model for the main dashboard to a different data model, the datamodel for sub dashboard does not change.
Therefore the data in the sub dashboard is not displaying information that pertains to currently selected data model.
What can I do to remedy this?
Piotr_qbeeq
·4 months agoHi Rose
Sisense does not support dynamically switching the data model within a single Accordion/Drill dashboard.
Dashboards are always tied to one specific data model, and all drilldowns inherit that structure.
Common workarounds:
Separate dashboards per model and route users via navigation or JumpTo logic
Unify the data into a single model if possible (often the cleanest approach)
Use a shared model with a controlling dimension (e.g., DataSourceType) instead of switching models
So in practice, this is handled at the architecture level rather than dynamically at runtime.
Hope this helps — happy to clarify if you’re targeting a specific setup.
Best Regards,
Piotr from QBeeQ, a Sisense Gold Implementation Partner
www.qbeeq.io
Rose Holmes-Minton
OP3 months agoHi Piotr,
It is possible to do using the Dynamic Elasticube and accordion plugins
Some minor modifications have to be made to java script of both plugins. I received support from Sisense Support and was able to do it.
Rose Holmes-Minton
OP3 months agoHi Piotr,
Here are the instructions from Ivan Amoshyi, Sisense Support, on what to do:
You have to make the following changes to the Accordion and DynamicElasticube plugin code:
Note: Before making any changes to the Accordion plugin code it is recommended that you save a local the copy of its folder from File Management > plugins > accordionPlugin as a backup if something goes wrong.
Accordion Plugin Changes
Go to (File Management > plugins > accordionPlugin).
1) /services/dashboard.service.6.js
// Find and substitute the following functions with its updated version const getParamsForIframeUrl = (datasourceTitle) => { // Initialize with your defaults const params = new URLSearchParams('l=false&r=false&h=true&volatile=true&embed=true'); const searchParams = new URLSearchParams(window.location.search); const ignoredParams = ['filter']; // Iterate and append new params for (const [key, value] of searchParams.entries()) { // Only add if it's not already a default and not ignored if (!params.has(key) && !ignoredParams.includes(key)) { params.append(key, value); } } let cubeParam = ''; if (datasourceTitle) { cubeParam = "&cube=" + encodeURIComponent(datasourceTitle); } const result ='?' + params.toString() + cubeParam; return result; }; ------------------------------------------------------------------------- export const decorateDashboardUrl = (dashboardUrl, filters, datasourceTitle = null) => { const $webAccessTokenService = getLocalService('webAccessTokenService'); const targetDashboardQueryParams = getParamsForIframeUrl(datasourceTitle); const timeStampParam = Math.floor(Date.now() / 1000); const devidedDashboardUrl = dashboardUrl.split('app/main'); const getUrlWithParams = (baseUrl, path, additionalParams = '') => { return path.startsWith('#') ? `${baseUrl}?t=${timeStampParam}${path}${additionalParams}` : `${baseUrl}${path}?t=${timeStampParam}${additionalParams}`; }; const baseUrl = `${devidedDashboardUrl[0]}${ $webAccessTokenService.isTokenFlow ? $webAccessTokenService.urlPrefix : '' }app/main`; const additionalParams = $webAccessTokenService.isTokenFlow ? `${targetDashboardQueryParams}${$webAccessTokenService.tokenParamsString}` : targetDashboardQueryParams; const url = getUrlWithParams(baseUrl, devidedDashboardUrl[1], additionalParams); return BaseConfig.postFilters ? url : addFiltersParamToIframeUrl(url, filters); };2) main.6.js
Find decorateDashboardUrl function being called from inside clickHandler and widgetReadyHandler functions. We need to make sure it accepts the third argument in both cases, like so
decorateDashboardUrl(dashboardUrl, filters, widget.datasource.title);dynamicElasticubes Changes
1) config.6.js file change the UrlParamName to "cube"
Make sure the changes in all files in are saved and test the dashboard. If it does not work, try stopping and starting the dynamicElasticube.
Piotr_qbeeq
·3 months agoHi Rose
Just to clarify: are you actually switching the dashboard's underlying data model, or are you switching between dashboards that happen to use different models?
If it's the former, I'm not aware of a native way for an Accordion/Drill dashboard to automatically inherit the parent dashboard's data model. Each dashboard remains bound to its own model, so the drill target will continue using whatever model it was built on.
One possible workaround would be to create matching drill dashboards for each model and route users to the appropriate target dashboard. Another option, if feasible, is to use a shared/hybrid model so both the parent and drill dashboards can reference the same underlying data structure.
Could you share a bit more about how you're switching models today? That might help identify a more specific solution.
Best Regards,
Piotr from QBeeQ, a Sisense Gold Implementation Partner
www.qbeeq.io