How about making some details of icCube’s Reporting Editor more personalized to your corporate branding?
A new feature that allows to change the Reporting application’s buttons color as well as the reports’ default theme and palette on icCube is now available.
This feature is especially useful for customers who are embedding icCube into their own product or solution (to those who allow their users to edit reports, of course) and want to make some details of the application closer to their corporate branding.
Learn how to in 3 simple steps.
Go to Docs > Public > icCube.json and click on the magnifying glass on your right to edit the JSON file.
Change the following settings according to your corporate/branding defaults:
The Reporting application’s buttons color, under “primary”
The default theme when creating a new report
The default color palette when creating a new report
For this example we have used the following settings:
We are usually looking at our dashboards on our computer screens, but sometimes we are on the go and want to quickly check your dashboard on your phone, tablet or even just need the report printed out to be able to take it during a meeting.
Anyway, icCube offers you the possibility to create a same dashboard with multiple layouts for your different devices and needs: Desktop, Tablet, Mobile, Printing and Printing Landscape. Here’s how to.
Creating a new Layout
First create your dashboard as usual, the default layout is Desktop. The screens icon on your left menu bar allows to add more layouts.
When creating a new layout, you can directly add all your widgets at once or not. N.B.: it could make sense not to add all widgets, in the case of filters for a printed report for instance.
Check out an example of a Tablet layout:
… and an example of a Printing layout:
Sometimes, adding all widgets at once and moving them around will not be well adapted to the layout you are creating, e.g. font sizes, column widths and row heights. You therefore need to change some of the widgets’ configurations for it to better fit the according layout.
Layout-specific widget settings
By default, when the widget created on the Desktop is used for another layout, the “use default layout” box is checked. Uncheck it to change the widget’s configuration or reclick it to go back to the same settings as used on the Desktop report.
The image below shows the configuration of a table on a Printing layout with layout-specific column widths and row heights.
User-Defined and Reset settings
A last feature which can be very helpful – and was implemented a couple months ago – is the User Defined and Reset buttons.
The first allows to show only user-defined settings, quite practical if you wish to quickly see exactly what settings you have changed, and the second to reset all configurations back to default.
On this video, you’ll learn how to create an icCube report with 5 features, from basic to advanced:
1 – Table2 – Filter3 – Conditional coloring4 – Sunburst5 – Event (row click) Bonus: The editor is in Chinese! In fact, icCube’s Reporting Editor is available in English, French, Russian and Chinese.
Enjoy!
For a same report, you can have different layouts: Tablet, Mobile, Print or Print Landscape. You can customize the widgets (have different configurations across layouts) so they can be better fitted to each layout!
A waterfall chart, or bridge chart, a special visualization
often used in financial reports. It is a specific data visualization that shows
how a specific total is transformed to another value by showing the cumulative
result of changes between these.
The waterfall chart is very useful to visualize financial data:
to provide an explanation for the deviations from a benchmark
value by zooming into the underlying details (for example: months, business
units, products, … etc). I call this type the “variance break-down waterfall
chart”;
to show the progressive buildup of a profit & loss statement
(or parts of it). I call this type the “P&L break-down waterfall chart”.
Both types of waterfall charts have each their specific
application in financial reports and dashboards. When used with icCube’s
dynamic filtering and drill-by options, these visualizations will provide a
powerful tool for the finance professional to analyze performance and track
profitability.
This blog post will outline the steps to create the first
type of waterfall chart in icCube, using the standard serial chart: the
variance break-down waterfall chart. I will document the steps to create the
second type later this month.
If you want an interactive demo in icCube, to see the “waterfall – variance break down” live, click here.
This will be the end result if you have followed the five steps of this blog post:
type 1 waterfall chart – variance break-down: explaining the differences between the budgeted and realized Operating Income by zooming into the variations of the underlying business units.
the data set for the variance break-down chart
Below the data set you need to create the variance
break-down chart. For illustration purposes , the totals for actuals and budget
have been included.
Break-down of the variation between the Actuals and the Budget to explain the variations. The left data set shows the break-down to periods, the right set shows the break-down to business units.
Both break-downs explain the variation between cumulative
Actuals and Budget on May 2018. I use the following definitions in this data
set:
ist – the actual value (“ist” is German for “is”);
soll – the benchmark or reference value, in this case the
budgeted value (“soll” is German for “to be”)
I have kept the required data set as simple as possible, so
it can be easily reused in other visualizations (variance chart or just a plain
column chart).
details of the steps to create this visualization
The visualization will have the following characteristics”
chart type: serial chart (amCharts) in icCube;
use of the “open” and “close” data fields to draw the columns;
conditional coloring of the bars depending on the value;
conditional text in the balloons;
use of custom numeric formatting;
use of javascript to calculate the right data points;
use of MDX to add an additional start and end row;
allow the correct display of expense accounts;
the visualization is flexible with regard to the number of data rows.
(Expense accounts are accounts which value will be subtracted from the profit. An excess of the actual value compared to the benchmark is considered to be negative and should be marked as such. For example: you have spent too much money on Marketing.)
step 1 – the data manipulations in MDX
As you can see from the waterfall chart image at the
beginning of this post, just the break-down figures are not enough, I also need
the start value (the total Benchmark) and the end value (the total Actuals):
Need to add the start- and end point of the waterfall bridge (Budget and Actuals respectively) to the data. The values will be calculated by Javascript in the next steps.
To add these additional rows, I use the following MDX:
[icCubeMdx]
WITH
// set the rows definition
SET [bridge] as descendants([Business Unit].[BU],,leaves)
MEMBER [Business Unit].[BU].[start] as 0, caption = "Benchmark"
MEMBER [Business Unit].[BU].[end] as 0, caption = "Actuals"
// set ist and soll
MEMBER [Measures].[ist] AS ([measures].[amount],[scenario].[actuals])
MEMBER [Measures].[soll] AS
iif([Time].[Time].currentmember.key <> null and [Time].[Time].currentmember.key <= currentmonth().key
,([measures].[amount],@{selBenchmark:asMdx})
,null
)
// is ist an expense type (i.e. excess to soll is negative, shortage is positve)?
MEMBER [Measures].[@et] AS iif([ist] = null,null,[Account].[Account].currentmember.properties('@et'))
// do not change
SET [rows] as [start] + [bridge] + [end]
SELECT
// Measures
{[Measures].[ist],[Measures].[soll], [Measures].[@et]} ON 0,
// Rows
NON EMPTY @{selAccount} * [rows] ON 1
FROM [Finance]
WHERE {@{selView}} * @{selYear}
CELL PROPERTIES STYLE, CLASSNAME, VALUE, FORMATTED_VALUE, FORMAT_STRING
[/icCubeMdx]
A short explanation:
parameters:
@{selBenchmark} – value for the benchmark. One of Budget, Prior Year, Forecast.
@{selAccount} – selected account
@{selView} – selected view on the data. One of: Periodic (loaded data), YTD (cumulative)
@{selYear} – selected period
functions:
currentMonth() – date of the last actual month loaded
the row definition is defined in the data set [bridge];
two calculated members [start] and [end] are added to make up for the [rows];
the measure [ist] is calculated using the [amount] at [Scenario].[Actuals];
the measure [soll] is calculated using the [amount] at @{selBenchmark}. Note that you do not want to show the future periods for the soll, therefore check if the period exceeds the currentMonth();
the measure [@et] retrieves the property “@et” (= Expense Type) for the selected account.
To create the chart do the following:
create a new Serial chart;
add the MDX to the “MDX” tab in the “Data” section (change to your data model)
Here is the result:
Serial chart as a result of step 1. To the right the result of “//Measures” changed to “//Columns” in the MDX code.
step 2 – filling the data series
The chart from step 1 looks nowhere near the bridge chart
required. We need amChart to calculate the total start and end value, including
the variances between the ist and the soll as indicated by the following figure:
open and close values to be calculated by javascript to provide the data points for the waterfall chart
To calculate this data do the following:
In the “Data Render” tab, add the following “value” function to the “value” field.
In the javascript, the JS expressions as documented here are used.
Value + Edit:
// close field
// close field = total_soll + cum_ist - cum_soll
var label = context.rowLabel(context.getRowIndex());
var total_soll = context.sumCol(0, 'soll');
if (context.getRowIndex() === 0) {
return total_soll;
} else if (context.getRowIndex() == context.rowsCount -1) {
return context.sumCol(0, 'ist');
} else {
var cum_soll = context.cumulativeCol(0, 'soll');
var cum_ist = context.cumulativeCol(0, 'ist');
return (cum_ist - cum_soll) + total_soll;
}
In the “Data Render” tab, click on the radar icon in the “column graph”,
click “data fields” and add the following javascript code to the “open field function”.
open field function:
// open field = close field - (current_ist - current_soll)
// close field = total_soll + cum_ist - cum_soll
var total_soll = context.sumCol(0, 'soll');
if (context.getRowIndex() === 0) {
return 0;
} else if (context.getRowIndex() === context.rowsCount-1) {
return 0;
} else {
var cum_soll = context.cumulativeCol(0, 'soll');
var cum_ist = context.cumulativeCol(0, 'ist');
var ist = context.getValue('ist');
var soll = context.getValue('soll');
return (cum_ist - cum_soll) + total_soll - (ist - soll);;
}
The result of step 2:
Result of step 2, the basic form of the bridge chart by calculating the open and close fields for the column chart.
Step 3 – adding conditional coloring
Now, we want to color the first and end value grey. The
intermediate values follow the following logic:
logic to color the break-down variances in the chart
To add the conditional coloring, click on the (2) “Color Mode” “Palette
for Legend” button in (1) the left panel of the “column graph” and add (4) the
following java script code to the section (3) “<> Expression”:
instructions to change the color of the columns
the javascript code to add:
var label = context.rowLabel(context.getRowIndex());
if (context.getRowIndex() === 0) {
return "#858585"; // grey
} else if (context.getRowIndex() === context.rowsCount-1) {
return "#858585"; // grey
} else {
var ist = context.getValue('ist');
var soll = context.getValue('soll');
var expenditure_type = context.getValue('@et');
var variance = ist - soll;
if ((variance > 0 && expenditure_type == 'E') || (variance < 0 && expenditure_type != 'E') ) {
return "#D53E4F"; // red
} else {
return "#66C2A5"; // green
}
}
result of step 3:
result of adding conditional coloring to the waterfall chart
step 4 – adding the labels
Next is to add the labels with the values, neatly formatted
according to its size. I am using a custom javascript function for this that
formats the values in a short and readable format:
function formatNumber(value, precision=1) {
var factor = Math.pow(10, precision);
var thousand = 1000;
var million = 1000000;
var billion = 1000000000;
var trillion = 1000000000000;
if (Math.abs(value) < thousand) {
return String(Math.round(value*factor) / factor);
}
if (Math.abs(value) >= thousand && Math.abs(value) <= million) {
return Math.round(value/thousand * factor) / factor + 'k';
}
if (Math.abs(value) >= million && Math.abs(value) <= billion) {
return Math.round(value/million * factor) / factor + 'M';
}
if (Math.abs(value) >= billion && Math.abs(value) <= trillion) {
return Math.round(value/billion * factor) / factor + 'B';
}
else {
return Math.round(value/trillion * factor) / factor + 'T';
}
}
add the formatNumber function to the dashboard Configuration > Report
Javascript, or alternatively add it to the ic3report-local.js as described here;
open the (2) “Bullets and Labels” section for the (1) “Column Graph” and
(3) add an “x” tot he “Label Text”. Next (4) add the code below to the “ Label
Function”:
To help your audience to understand the chart, I want to
display the balloon text according to the following information:
logic for the balloon text
This is how to do that.
add the following javascript code to the “Column Chart” and “Balloon
Text” field in the left panel:
// call to custom JS function formatNumber
var p = 1; //precision
if (context.getRowIndex() === 0) {
return "total @{selBenchmark:caption}: "+formatNumber(context.sumCol(0,'soll'),p);
} else if (context.getRowIndex() == context.rowsCount-1) {
return "total Actuals: "+formatNumber(context.sumCol(0,'ist'),p);
} else {
var ist = context.getValue('ist');
var soll = context.getValue('soll');
var expenditure_type = context.getValue('@et');
var variance = ist - soll;
if ((variance > 0 && expenditure_type == 'E') || (variance < 0 && expenditure_type != 'E') ) {
var fVar = "<font color='#D53E4F'>"+formatNumber((variance),p)+"</font>";
} else {
var fVar = formatNumber((variance),p);
}
return "variance: " + fVar + "<br>Actuals: " + formatNumber(ist,p) + "<br>@{selBenchmark:caption}: "+ formatNumber(soll,p);
}
The final result is now:
final result – a waterfall chart that breaks down the variances
Conclusion
These five steps have transformed the soll and ist data set
into a waterfall chart that breaks down the total variance between a benchmark
value and the actuals to its details. In this particular example we did this
for the business units, but something similar can be easily done for the
months. The only thing to be changed are the first three lines in the MDX
statement.
Having the waterfall chart defined in the standard serial
chart gives us additional fine-tuning options that are available by default,
such as adding a cursor, adding a scroll bar, turning the chart to a bar chart,
etcetera.
For example:
waterfall – variance break down chartto periods (column & chart version)
I hope you enjoyed making this visualization. Please share
with me your results, my contact details are below.
It’s a kind of magic … to transform loads of data into insight giving dashboard products that show your audience what step to take next, based on your data.
I work closely together with icCube being a Dutch reseller. I love their product that allows me and my clients to launch meaningful dashboard products and to embed analytical insights into their software.