Models are configurable objects that combine data queries with spreadsheet-like templates, enabling you to build advanced reporting and interactive planning models. You can give each model a name, define the template, create formulas and logic, add queries, and set user permissions.
Once created, you can run models as often as you want. XLReporting will always pull the latest data into your templates.
You can also watch the tutorial video.
When you sign up, your tenant already has a number of predefined models, aimed at financial reporting. They contain example data of a fictitious company. You don't have to start from scratch, you have working examples which you can start with, and you can add or change models at any point in time.
Some common examples of models are:
Unlike spreadsheets, XLReporting models enforce proper separation between logic and data. When creating models, you should not enter data into a model, but use queries instead.
Models are typically used for 2 different purposes:
You can create a model in two ways (watch the tutorial video):
Either way, the rest of the process is the same, and you can enter a name for your new model, set user permissions for it, and define its sheets and queries:
When you create a model, you should focus on the template, don't enter real data. You can integrate data through queries, which we'll explain below. The above example -with just a few rows- is a fully functional model.
You can use the toolbar to populate and format the cells, create formulas, set named ranges and conditional formatting - all in the same way as in Excel. You can also insert objects, such as cell editors, named ranges, sparklines, images, web links etc. XLReporting supports all common spreadsheet functionality. You can create multiple sheets if needed.
You can define the settings for the model via these fields:
Models can contain multiple sheets. Each sheet can contain its own content and layout. You can add sheets by clicking on the + icon. You can rename or delete a sheet by clicking on the arrow behind the sheet name. You can also re-arrange the order of sheets by simply dragging them.
If you prefix a sheet name with an underscore (e.g. _test), that sheet will be hidden in Run models. This is useful for sheets that are used for calculations or data processing but which you don't want to show to the user when running the model.
XLReporting has a powerful built-in spreadsheet, fully compatible with Microsoft Excel, in which you can build your models. You will find familiar tasks, such as sheets, columns, rows, cells, styling, functions, and a toolbar. You can create models in the same way you would build spreadsheets, with one major difference: models only contain logic and layout, they do not contain data. The data is retrieved in realtime through queries and functions.
Queries enable you to define how data sets will be integrated into your model. A model can contain multiple queries. During Run model, all its queries are simultaneously executed against the XLReporting database and the resulting realtime data is inserted into the model.
You can define queries by clicking on the Define button:
This opens a dropdown menu with further options:
When you add a new query, or edit an existing query, the first step is to choose the type of query and determine the name and settings for that query:
You can choose between 3 types of queries:
If you select Report or Data list, you need to select the source data set: this is the primary data set that you want to retrieve information from. All its linked data sets will be automatically included, and you can create a report in exactly the same manner as Define reports, including converting the data, filtering the data, and setting the report options and fields position.
If you select Import, you need to select the target data set: this is the data set into which you want to import the data from your model. You can create the column mapping in the exactly the same manner as Define imports, including mapping the columns, converting the data, filtering the data, and the settings for inserting or replacing data.
In Options when running the model you can select a number of features:
Once you completed the query definition, a special function will be inserted into the current cell: =QUERY(ID, range), where ID is the query number, and range is the cell range into which the query data will be inserted. The function shows the description of the query.
After every change, the preview of the query results is automatically refreshed, which helps to integrate the query into your model.
The cell that contains the =QUERY(ID, range) function indicates where the query data will be dynamically inserted during Run model:
The 3 rows below the placeholder are templates for the actual query data:
You can set the cell styles (i.e. font, size, cell format, colors, borders etc.) for each of the 3 template rows. If left blank, default cell styles will be applied.
During Run model, realtime data will be inserted and the above template produces the following result:
You can use functions to pull selected data from report or data queries into individual cells. Unlike report queries, which insert an entire formatted report into a range of cells in the model, functions enable you to insert a single value or an aggregate total (e.g. a sum or count) into one cell. You can create as many functions as you want, to populate multiple cells with varied data:
The example in this screenshot retrieves the sum of column 4 of query ID 1 for all rows where column 2 = "Revenue"
There is a collection of query functions that you can choose from. All query functions require the same parameters between brackets:
Cell objects are components that you can insert into a model to create advanced functionality in a model.
To add cell objects, you need to select a cell or range of cells, and click one of these buttons in the toolbar:
You can choose from various types of objects:
Once you click the toolbar icon, a popup window will guide you through the process of defining the object.
By default, models are read-only in Run model (i.e. all cells will be locked and filters are inactive).
But you can also create planning models that allow users to enter and edit information into the model during Run model. You can create these type of models in 2 or more steps:
Cell editors are definitions that you can insert in a cell (or in a cell range) to make a cell editable (remember: by default, all cells are locked) and define both the type of cell value and the method by which users will be able to enter or select cell values.
To add a cell editor, you need to select a cell or range of cells, click the relevant button in the Insert section of the toolbar, and select the desired editor:
You can choose from 9 types of editors:
When you add a cell editor in a cell or range of cells, those cells are unlocked, and the user can enter or edit data in the model (and validated by the selected editor) during Run model.
Planners are configurable patterns that can be used to distribute amounts across a range of cells (for example, to apply a seasonal revenue pattern to a series of financial periods).
Adding planners to a model requires 2 steps:
The below example defines 4 patterns for a cell editor: monthly, quarterly, every half year, and a custom "Summer" pattern:
The absolute values of the numeric patterns are irrelevant, what matters is each relative value as a proportion of the sum of all values. You can define as many indices in the patterns as you need.
You can also use one of the below aliases for common patterns:
In addition to defined static planners, you can also refer to a data query. Your data query can include multiple rows, with each row being treated as a separate planner. The first column on every row needs to contain the planner name, and the other columns need to contain the numeric patterns.
By default, the user can only select one of the predefined patterns, but you can optionally allow the user to manually enter and edit patterns on every row by enabling the option Add new. When selecting the option Edit .. the user can manually enter and edit the pattern:
When you allow editing planners, you can define the names of the periods using a cell range of list a values.
You can use the selected planner using 2 functions: PLAN and PLANNER.
The PLAN function returns the range of absolute values, or the absolute value at the selected index, of the selected planner. You can incorporate those value(s) in any formula.
The PLANNER function returns a proportion of data according to the selected planner and the selected index. The returned value is calculated as follows:
data * value of given planner index / sum of all planner values
If the given index does not exist in the planner, the function will use the given
ratio (which can be a cell reference, a formula, or a given value) and will return
the result of data * ratio.
If neither the index or a ratio exists, the function will return 0 (zero).
PLANNER(data, planner, index, ratio)
PLANNER(1000, "Months", 6) = 83.33 (1000 * 1 / 12
PLANNER(1000, "Weeks445", 6) = 96.15 (1000 * 5 / 52)
PLANNER(1000, "Summmer", 6) = 111.11 (1000 * 4 / 36)
PLANNER(1000, "", 0, B3/C3) = 200.00 (1000 * 1/10, assuming B3=1 and C3=10)
Using a dropbox table you can enable end users to fill in multiple rows with 2 columns (text and value), for example to enter a specification.
The result is stored as text into one single cell on the current row, and can therefore be saved to a data set using an import query, and retrieved into the model again using a query or DGET function. You can use the function UNWRAP to retrieve the total value of the table (just a reference to the cell without further parameters), or a selected row (with the row number as an additional parameter), as follows:
You can incorporate images in models, based on an external URL. The cell data can be dynamic, enabling you to show images based on your data (e.g. product images or document scans).
Images are "anchored" independently over the cells in the sheet. You can drag (and resize) them how you want, even in front of visible cells. They maintain their position even if you insert or delete rows and columns, except when inserting or deleting rows in Run models through report queries, DROWS, DCOLUMNS, TRANSPOSE functions, or Row actions.
In Run model, sheets will always have the exact number of rows and columns that contain data, without any trailing empty rows or columns. When using report queries, extra rows or columns may be inserted and images will be re-positioned accordingly, but images can never exceed the position of the last row or furthest column with cell data. Therefore, you may have to create some cell value (for example, behind the right-bottom corner of the image itself) to allow it to be properly re-positioned.
You can incorporate charts in models, based on cell data in your model. The cell data can be populated through queries, enabling you to build highly interactive dashboards. You can control the appearance of charts via a number of settings across 3 sections: Common, Series, Extras.
Charts are "anchored" independently over the cells in the sheet. You can drag (and resize) them how you want, even in front of visible cells. They maintain their position even if you insert or delete rows and columns, except when inserting or deleting rows in Run models through report queries, DROWS, DCOLUMNS, TRANSPOSE functions, or Row actions.
In Run model, sheets will always have the exact number of rows and columns that contain data, without any trailing empty rows or columns. When using report queries, extra rows or columns may be inserted and charts will be re-positioned accordingly, but charts can never exceed the position of the last row or furthest column with cell data. Therefore, you may have to create some cell value (for example, behind the right-bottom corner of the chart itself) to allow it to be properly re-positioned.
You can incorporate tables in models, showing the results of a selected query.
Tables are "anchored" independently over the cells in the sheet. You can drag (and resize) them how you want, even in front of visible cells. They maintain their position even if you insert or delete rows and columns, except when inserting or deleting rows in Run models through report queries, DROWS, DCOLUMNS, TRANSPOSE functions, or Row actions.
Tables are meant to display small sets of data. They intentionally do not support scrolling as that would not work when printing the model or exporting it to PDF. Please ensure your query returns a small number of rows and the table window is sized accordingly.
In Run model, sheets will always have the exact number of rows and columns that contain data, without any trailing empty rows or columns. When using report queries, extra rows or columns may be inserted and tables will be re-positioned accordingly, but tables can never exceed the position of the last row or furthest column with cell data. Therefore, you may have to create some cell value (for example, behind the right-bottom corner of the table itself) to allow it to be properly re-positioned.
Row actions are are configurable buttons that you can insert in a cell in a model to allow rows to be inserted, copied, or deleted.
To add row actions, you need to select a cell or range of cells, click the relevant button in the Insert section of the toolbar, and select the desired action:
This option enables you to define precisely where rows can be inserted, copied, or deleted in the model during Run model. Typically you would only enable this in the data entry section of your model.
Once created, you can call the row actions by clicking on one of the icons. Row actions are only active in Run models.
By creating an import query in your model, you can save information back into a data set.
For every import query, you can select how new data will be imported into the data set:
Once you have added an import query to a model, a Save button will automatically be added to the Run models screen, and the user can enter and edit data (in cells where you have created the above cell editors) and click the Save button when done.
XLReporting expects the row below your query to contain columns headers, and you can specify how many rows of data you want to import. If you combine import queries with report queries, the number of rows will be automatically expanded based on the results of the report query.
For each column in your target data set, you can either select the relevant column in your model, a static value, or a function. You can also transpose columns into rows, convert the data, and filter the data. It works in the same way as Define imports.
When saving, XLReporting will try to process every row it encounters, up until the number of rows you have specified.
The option Keep silent suppresses non-critical notifications during the save process. Only real errors will be shown. Regardless of this setting, all results will always be shown in Actions - View saved results when running the model.
When defining models, you may often lay out information across columns, for example period-by-period amounts. The option Transpose data will transpose the selected column data into rows and you can use the 2 special columns TRANSPOSE in the column mapping to your data set. By default, the transpose operation will skip empty values and zeros. If you want to transpose all columns onto all rows even if they are empty, you can do so by selecting the Also include empty option.
The option When empty enables you to define the action when a field has no source value: either skip the entire row, abort the entire import (nothing will be imported), or repeat the value from the previous row (which is useful if your import data is grouped).
Click on the Import batch field to combine multiple imports into a batch which are then run as one single action together with the import queries of this model.
You can insert or delete imports at any time, and re-order them, using the dropdown menu in the last column.
By default, imports will be started in the order that you define them, and processed in parallel (i.e. near simultaneously). This gives the fastest performance in general, but if you have certain imports that require other imports to be completed first, you can set Wait in line. When this option is set for an import, it will only be started and processed once all its predecessor imports have completed.
When defining a model, you can use the Save and Actions buttons in the right-top of the screen:
These buttons enable you to do the following:
Please note that the list of actions is dependent on the permissions (in your user roles) that you have been given.
Using the PRINT function anywhere in your model, you can dynamically define page numbering, pagination, repeating headers, and paragraphs (widow/orphan control). You can also dynamically hide sheets, rows, columns, and cells when printing or exporting to PDF. This only takes effect in prints and PDF exports, on the screen you will see icons as placeholders.
XLReporting will always try to fit the content to the available page width, as following:
Page numbering is automatic, starting at 1 and numbering sequentially through all pages and sheets in the model. Hidden sheets are excluded from page numbering. You can also specify a specific page number by setting PRINT("number", start) at any place in your model where start is the new page number. The page numbering will continue to increment from that number onwards.
Click on Actions - Review this model to review a number of aspects of this model and its currently selected query:
You can also watch the tutorial video.
A dashboard is a personal page with your own favorite reports and models. You can create multiple dashboards, and each dashboard can contain multiple reports or models.
Click on Actions - Add to dashboard to add this model to either a new dashboard, or to a new dashboard (watch the tutorial video):