Refreshing Rules in Jedox: A Step-by-Step Guide

Refreshing Rules in Jedox: A Step-by-Step Guide

Hi team, today we will talk about keeping your OLAP (Online Analytical Processing) rules up-to-date in a dynamic environment where data changes frequently. Jedox, a powerful platform for planning, analytics, and reporting, allows users to refresh or update rules easily from the spreadsheet server in case your business rules are set in that way. In this post, we'll dive into how you can use a simple PHP function to refresh rules for a specified database and cube. Why Refresh Rules? In Jedox, rules define how data is calculated within a cube. For instance, you might have rules that calculate 'Price' or 'Units' in a sales-related cube. When underlying data or logic changes, these ones need to be recalculated or refreshed to ensure the accuracy of your reports and dashboards. The Code Explained Here's a look at a simple function that makes the refresh in Jedox: function _Refresh_Click(){ $host = $_JEDOX['OLAP_HOST']; $port = $_JEDOX['OLAP_PORT']; $conn = palo_init($host,...
Read More
Running ETLs via macro using REST standard

Running ETLs via macro using REST standard

The Integrator Server SOAP API has been deprecated as of Jedox 2022.4. If you used this standard to run ETL via macros you will need to change it now. There are two ways of doing that: Running ETLS via action buttons (highly recommended) Running ETLs via macro using Rest standard Action buttons are now already well incorporated in many Jedox projects and running ETL via them should be an easy task. However if you have issue to build such a connection, check out this link. Running ETLs using Rest standard takes a bit of coding but nothings super complex. IF you had SOAP connection-build-macro-report, make a backup of it and then delete all the code. Have in mind that if you had any IF or any other statements in the code before, make sure to save them. First we need to call the library require library('integrator-rest'); After that code for running looks like this: function sampleETL() {   $etlProject = "PROJECT NAME";   $etlJob = 'JOB NAME';   // define array...
Read More
Add element to the Jedox database via macro

Add element to the Jedox database via macro

In this post, we are going to show you how to use multiple PALO functions in the macro to successfully add element in the dimension. For this purpose we are going to use the Biker database and elements will be added to the Product dimension. Have in mind that example is for the users who use the cloud instance of jedox. First we need to establish connection with the OLAP. $host = $_JEDOX['OLAP_HOST'];$port = $_JEDOX['OLAP_PORT'];$conn = palo_init($host, $port, $_JEDOX['OLAP_SESSION_ID']);   Then we need to formulate Palo.EADD function. this function consists of the following parameters. PALO.EADD(Server/Database, Dimension, Type, Element, Parent Element, Weight, Clear, Error suppr.) Possible values for Clear are 0 (or FALSE), 1 (or TRUE) and 2 0: Removes no elements of the dimension before importing 1: Removes all elements of the existing dimension before importing 2: Removes all existing elements of the C-dimension before importing. Basic elements are not deleted. More about this and other functions can be found here. When these are combined code should look something like this:     function...
Read More
Excel download using macro

Excel download using macro

Here is one quick way to download a file as an Excel. In normal conditions, Jedox offers two possibilities to Export to Excel: XLSX Snapshot XLSX OLAP Snapshot More about differences can be found here. Sometimes, we want to limit end users from seeing these buttons. That can be done in this way [see bellow] by clicking on report properties and unchecking Interface checkboxes. Now, when the report does not contain anything related to Jedox bars we can install the macro for exporting. The code behind the macro is very simple: return array   (   array('actn', "exportToXLSX",2), ); The final output looks like this: The whole project can be downloaded from here....
Read More
How to create a colour picker in Jedox?

How to create a colour picker in Jedox?

Jedox has a wide range of possibilities when it comes to reporting since it is working based on Excel technology. Having that in mind it might happen that sometimes you will need to add a colour picker to your dashboard. Here is an example of how it could be done. On the spreadsheet, you can put the colours which could be chosen Set up a macro which will be trigged when colour is clicked ="<a href=""#"" title='"&U5&"' style=""height:100%;width:100%;display:inline-block;color:"&U5&";background-color:"&U5&";"" onclick=""Jedox.wss.macro.exec([true,['Module1.saveColorToVariable','"&V5&"']])""> </a>" Create the macro in the Macro Editor function saveColorToVariable ( $color ) { define_variable ( 'varColor' , $color ); //return do_close(); } That is it!! In case you are not a person who has much sense for colours, there are amazing patterns of colours on this website. An example of the project can be found here....
Read More
How to return IP address from the Spreadsheet in Jedox

How to return IP address from the Spreadsheet in Jedox

Here is the sample of the macro PHP code which can help you to return the IP address of the current server from the spreadsheet. It could be useful when reports contain download functionality which is the source on the server name. So in order not to have a hardcoded server DNS name you could use this funcionality. -------- function temp(){ $localIP = getHostByName(getHostName()); return __msgbox("myComplexVariable=".print_r($localIP , TRUE ), 'Test', 'Info'); } --------...
Read More