Sisense Community logo
    • Community Feedback
    • Chapters
    • Events
    • Forums
      • Help and How To
      • Product Feedback Forum
      • Strategy & Use Cases
    • Blogs
    • KB Docs
      • KB Docs
      • Add-Ons & Plug-Ins
      • APIs
      • Best Practices
      • Blox
      • CDT
      • Cloud Managed Service
      • Data Models
      • Data Sources
      • Embedding Analytics
      • How-Tos & FAQs
      • Onboarding
      • PySisense
      • Security
      • Sisense Administration
      • Sisense Intelligence & AI
      • Troubleshooting
      • Widget & Dashboard Scripts
    • Support
    • Learning
      • Sisense Academy: Free Courses and Certifications
      • Official Developer Documentation
      • Official Product Documentation
      • Official Sisense Youtube Channel
      • Sisense Compose SDK Playground
      • Official Sisense Discord
    • Use Case Gallery
    Discussions
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
    •                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    Discussions
    • TagsChevronRightIcon
    Information Technology Analytics
      • Data ModelsChevronRightIcon

      Reading multiple excel files into Sisense data model

                                                       

      Reading multiple Excel files into Sisense data model Introduction: If you are migrating from Windows to a Sisense Linux-hosted solution, on the Sisense Windows machine you may use an SFTP client that moves Excel files placed in a remote server's folder to a folder on the Sisense Windows server. With this, it is used as a source folder for Excel file import to an ElastiCube. Since this is not possible with your hosted Linux, we could use the CDATA SFTP Connector to import these files.  In your existing connection string, you will get just the names of the files. When connecting to an Excel sheet stored in an SFTP server, the URI must be  sftp://<server>:<port>/<path to file> , as shown below. If the connection string does not contain this, you will just get the names of the files.   Additionally, the  ConnectionType  and  AuthScheme  must be set to  SFTP , and the SSHAuthMode must be set to either  None ,  Password , or  Public_Key  depending on your SFTP server. If the issue still persists, it would be helpful to have a log file. To generate a log file, in your connection string to Excel, please set the Log file to the path where the log file will be generated (such as C:/Logs/log.txt) and Verbosity to 3.  Then reproduce the error. Additional Resources: Sisense Docs: https://docs.sisense.com/win/SisenseWin/introduction-to-data-sources.htm Sisense Academy:  https://academy.sisense.com/sisense-data-designer-web-application  

      Vicki786
      Vicki786Posted 1 year ago
      0
               
      • Widget & Dashboard ScriptsChevronRightIcon

      Limiting Date Range Filters in Sisense Dashboards

                                                                                                                               

      Limiting Date Range Filters in Sisense Dashboards Use Case Overview Wide date ranges in Sisense dashboards can lead to performance issues, especially when using live models or querying large datasets. For live data models, large queries increase costs as more data is pulled from the data warehouse. For Elasticubes, this can cause performance bottlenecks. To avoid these issues, it’s essential to limit the date range users can select, ensuring both cost-efficiency and smooth performance. Solution To address this, we can use a dashboard-level script that automatically limits the date range. When users apply a date range filter, the script checks if the range exceeds a defined maximum (e.g., 30 days). If it does, the script adjusts the FROM date to be within the limit while keeping the TO date as the user selected. Key Insight: The “filterschanged” event is triggered before the query is sent to the backend. This means the query is only sent once, with the modified date range, avoiding redundant queries that could increase load or costs. Implementation Here’s the concise script for implementing this logic:       dashboard.on('filterschanged', function(el,args){ //console.log(args); //**************** User Input **************** var datefilterTable = "dim_date"; var datefilterColumn = "date"; var allowedDateRangeInDays = 30; var warningMessage = `Your From Date is modified to accommodate for the allowed date range of ${allowedDateRangeInDays} days`; var displayWarningMessage = true; // Set to false to turn off alert //******************************************** if(args.items.$$items){ if((args.items.$$items).length > 0){ (args.items.$$items).forEach( (item) => { if(item.jaql.table == datefilterTable && item.jaql.column == datefilterColumn ){ var dateFilter = item; var fromDateStr = item.jaql.filter.from; var toDateStr = item.jaql.filter.to; const fromDateObj = new Date(fromDateStr); const toDateObj = new Date(toDateStr); // Calculate the difference in days const currentDateRangeInTime = toDateObj - fromDateObj; const currentDateRangeInDays = currentDateRangeInTime / (1000 * 3600 * 24); // Checking if the Current Date Range is more than the allowed range if(currentDateRangeInDays > (allowedDateRangeInDays+1)){ const newFromDateObj = new Date(toDateObj); newFromDateObj.setDate(toDateObj.getDate() - (allowedDateRangeInDays)); // Format the date back to "YYYY-MM-DD" const year = newFromDateObj.getFullYear(); const month = String(newFromDateObj.getMonth() + 1).padStart(2, '0'); const day = String(newFromDateObj.getDate()).padStart(2, '0'); const newFromDateString = `${year}-${month}-${day}`; dateFilter.jaql.filter.from = newFromDateString; // Display warning message and update filter if(item.jaql.filter.to != newFromDateString){ console.log(warningMessage); if(displayWarningMessage){window.alert(warningMessage)}; args.dashboard.filters.update(dateFilter, {refresh: true, save: true}); } } } }) } } });       Key User Parameters: datefilterTable : The table containing the date filter. datefilterColumn : The specific date column to watch. allowedDateRangeInDays : Maximum allowed date range (e.g., 30 for 30 days). warningMessage : The message displayed if the date range is modified. displayWarningMessage : Controls whether a pop-up alert is shown. Conclusion This simple script ensures that user-selected date ranges stay within defined limits, improving performance and reducing costs. It adjusts the FROM date automatically, while the TO date remains as chosen, and ensures that only one query is sent to the backend—saving resources and improving efficiency. Additional Resources: https://academy.sisense.com/master-class-advanced-dashboards-with-plug-ins-and-scripts https://docs.sisense.com/main/SisenseLinux/customizing-sisense-using-code.htm  

      Sisense User
      Sisense UserPosted 1 year ago
      0
               
      • How-Tos & FAQsChevronRightIcon

      How to Calculate Absolute Sum

                       

      How to Calculate Absolute Sum We have a table with data and we are going to calculate the absolute SUM for [sum] column.   We divide this into two parts. First of all, we SUM all positive values with the formula       ([Total sum],[sum1])        The first argument is a SUM and second is a filter With the help of it, we select all positive values. The second part of the formula will be      ABS(([Total sum],[sum1]))     The first argument is the SUM of the values, the second filter of all negative values And all this calculation wraps with the function ABS (you can read more here ). The whole formula will have a look:     ([Total sum],[sum])+ABS(([Total sum],[sum1]))     And the final result of it will be 5   Check out this related content: Academy course Sisense Documentation  

      OleksandrB
      OleksandrBPosted 1 year ago
      0
               
      • Sisense AdministrationChevronRightIcon

      How to export snapshot file from Grafana

                                                       

      In case when it is not possible to share dashboard via https://snapshot.raintank.io/ (for example due to security policies)  next flow could be used to export JSON of dashboard with required data included: Open required dashboard and set the time range which includes time when issue was occurred  and + 2-3 hr before and ahead Click on share button, select Snapshot tab and click on Local Snapshot button. Once snapshot link would be available (will start from /app) click on COPY button Form URL with created snapshot and Sisense domain. Then press Enter. Example: Now snapshot is created and opened - Click on share button again Select the Export tab and click on Save FIle. Snapshot would be downloaded on your local machine This file could be imported in another Grafana instance as a dashboard with data inside. Such snapshots are very useful in troubleshooting and could be shared with a Sisense Support Team. 

      Vlad Solodkyi
      Vlad SolodkyiPosted 3 years ago
      0