Navigation: Smarten-Concept-Manual-BI > Analytic Functions >

Global Variables

 

 

 

 

4.4Global Variables

The global variables are defined at the cube level. They can be accessed globally with various expressions and filters for BI objects within Smarten.

 

For example, users need to view the projection of growth based on variable % values of sales amount. For this, a Custom Measure Column (UDDC) Growth can be created that would be calculated on the basis of a variable X and GrossSales. This X can be created as a Global Variable and assigned different values at different times to evaluate various scenarios. 

 

Formula for Growth: GrossSales + (X*GrossSales)/100

 

Users can change the value of X to see different projections of growth.

Any change in X would be reflected in all analyses where the value of X is used through different expressions in filters, the Custom Dimension Value (UDHC), the Custom Measure Column (UDDC), and retrieval parameters.  Hence, it saves users from the tedious task of modifying various expressions and filter formula manually and provides simple “what if” analysis scenarios. 

 

Once the global variable is defined, it would be accessible throughout the application while applying Filters, creating Custom Dimension Value (UDHC), Custom Measure Column (UDDC), and Retrieval Parameters. Users can also use these global variables in cube query while rebuilding Cache or Real-Time cubes.

 

User can also use the predefined system level global variable ‘$currentuser$’ in Real-Time cube query.

 

For example, user can create a real time cube using query "Select * from Sales where employeename = ‘$currentuser$’". In this scenario, if user1 is logged in and is using real time cube data, query expression will be:  “Select * from Sales where employeename = ‘User1’, and if user2 is logged in and is using this real time cube data, query expression will be: “Select * from Sales where employeename = ‘User2’.

Note:

Global variables are available within all BI objects (such as crosstab, graph, GeoMap, dashboards, and tabular) created from a cube. Global variables created for one cube cannot be accessed from within objects created from another cube.

 

CUSTOM MEASURE COLUMN (GROWTH) DERIVED USING GLOBAL VARIABLE X (VALUE: 15)

custom measure column (growth) derived from modified value of global variable x (VALUE: 20)

 

The value of global variable X is modified from 15 to 20. In the column Growth, new value 20 will be taken into consideration, and column values will change accordingly.

 

Note:

The global variables will be available for such objects as crosstabs, graphs, GeoMap, tabular, and KPIs.

 

 

 

Copyright © 2024 Elegant Microweb Technologies Pvt Ltd