K4 Analytics 2021 1 UsersManual
K4 Analytics 2021 1 UsersManual
K4 2021.1
VERSION
2021.1
CREATED ON
June 2021
K4 ANALYTICS LTD
Riverbank, Kells Business Park
Kells, Co. Meath, Ireland
www.k4analytics.com
TABLE OF CONTENTS
What can you do with K4? ............................................................................................................................................... 5
How does K4 work? .......................................................................................................................................................... 7
What are the development steps? .................................................................................................................................. 9
Workflow process overview ........................................................................................................................................ 9
Configuring the SQL database ...................................................................................................................................... 10
Preparing the buffer tables in the SQL database .................................................................................................. 10
Automatic creation of tables and views with K4 Studio ...................................................................................... 13
Connection String ....................................................................................................................................................... 14
Database Connections Manager .............................................................................................................................. 17
SQL meta-data caching .............................................................................................................................................. 18
Workflow – making changes in the SQL database ............................................................................................... 20
Implementing user-level security ............................................................................................................................. 21
Managing Excel templates ............................................................................................................................................. 22
Overview ...................................................................................................................................................................... 22
Excel features support ............................................................................................................................................... 25
The K4GET function................................................................................................................................................... 26
The K4SAVE function ................................................................................................................................................ 27
The K4SUM function – dynamic totals ................................................................................................................... 28
The K4SUMLOCK function – totals locking .......................................................................................................... 28
The K4VALUE function ............................................................................................................................................. 31
Template check-boxes ............................................................................................................................................... 32
The Template Manager .............................................................................................................................................. 34
Adding and configuring the K4 object......................................................................................................................... 35
Setting the K4 object properties .............................................................................................................................. 36
Saving the K4 object properties (QlikView, Qlik Sense, Tableau, PowerBI) ..................................................... 42
Dynamic rows generation.......................................................................................................................................... 43
Dynamic columns generation ................................................................................................................................... 46
SQL datasets ................................................................................................................................................................ 52
Host datasets ............................................................................................................................................................... 62
K4 Designer Mode...................................................................................................................................................... 63
K4 Context ................................................................................................................................................................... 64
K4 Dynamic Menu ...................................................................................................................................................... 72
Layout parameters dynamic replacement............................................................................................................... 77
K4 context menu......................................................................................................................................................... 78
Displaying / hiding template’s rows/columns based on Excel formulas ........................................................... 81
Leveraging the VLOOKUP function with datasets. .............................................................................................. 83
K4 Analytics | 2021.1 What can you do with K4?
Smart Drill......................................................................................................................................................................... 86
The power of Smart Drill ........................................................................................................................................... 88
Selecting non contiguous cells.................................................................................................................................. 88
Views ................................................................................................................................................................................. 90
Print & export to PDF .................................................................................................................................................... 92
Smart Links ....................................................................................................................................................................... 94
Documents’ gallery ......................................................................................................................................................... 98
Undo / Redo .................................................................................................................................................................. 100
Undo one or more actions ...................................................................................................................................... 101
Redo one or more actions ....................................................................................................................................... 102
Smart Data-Entry .......................................................................................................................................................... 103
Overview .................................................................................................................................................................... 103
How to configure it .................................................................................................................................................. 103
How to use it ............................................................................................................................................................. 106
Smart Copy with relative references ..................................................................................................................... 109
How to configure it .................................................................................................................................................. 109
Smart Copy: an example .......................................................................................................................................... 110
Smart Paste .................................................................................................................................................................... 112
How to activate ......................................................................................................................................................... 112
How to use it ............................................................................................................................................................. 112
Data-entry validation .................................................................................................................................................... 114
Aggregate data-entry ................................................................................................................................................... 114
Overview .................................................................................................................................................................... 115
SQL database requirements .................................................................................................................................... 117
Text & check-boxes .................................................................................................................................................. 120
Dates ........................................................................................................................................................................... 120
Managing locked data .............................................................................................................................................. 120
SQL-based allocation (MS SQL Server) ................................................................................................................. 121
SQL stored procedures ................................................................................................................................................ 123
Configuration ............................................................................................................................................................. 124
Example: copying budget data from one version to another ............................................................................ 126
Non-stored procedures (SQL statements execution) ............................................................................................. 128
How to configure it .................................................................................................................................................. 128
Executing a SQL statement on selected cells ...................................................................................................... 129
Blocking non-stored procedures execution based on keywords ..................................................................... 130
Using K4 to edit master tables ................................................................................................................................... 131
USERS’ MANUAL
Pag. 3 of 150
K4 Analytics | 2021.1 What can you do with K4?
USERS’ MANUAL
Pag. 4 of 150
K4 Analytics | 2021.1 What can you do with K4?
What is
Data Documents Audit Trail mean?
You can, for example, use K4 to manage a simple Profit & Loss statement with amazing speed and simplicity:
just build the template in Excel, link cells to data and use it inside the dashboard, users are not required to have
MS Excel installed.
And it doesn’t stop here … you can even enter data, text, date, checkbox and drop lists in K4, saving on the fly
to a SQL database! And manage master tables (e.g. products, versions, scenarios)!
USERS’ MANUAL
Pag. 5 of 150
K4 Analytics | 2021.1 What can you do with K4?
In a very simple way, you can lock data (disable the data-entry) on a cell-by-cell basis through a dashboard
parameter or a SQL expression or an Excel calculation: you can display actual data for closed month and editable
cells for planning months. The locking logic can be as complex as you need: taking into account for example the
current date versus the planning calendar and the current user versus the hierarchies.
You can manage a distributed planning process with multiple users entering data in a common database with
full control thanks to K4 Audit Trails feature.
K4 does not come with a predefined business model, you can use it to build exactly the application you need.
USERS’ MANUAL
Pag. 6 of 150
K4 Analytics | 2021.1 How does K4 work?
If K4 is configured for data-entry, when the user hits Save the new/changed data is sent to the web service
which takes care of writing them in a table in a relational database. The data is then read back on-the-fly from
the SQL database when the object is refreshed. (and eventually loaded back into the dashboard with a data
refresh).
You can use the K4 object in a document opened with the browser from the host server or opened with the
Desktop client. MS Excel is not required on the clients.
K4 uses its web service for write-back. The web service receives from the K4 object the new/changed data
together with the dashboard context (filters, parameters and eventual marks in Tableau – current selection and
variable in Qlik) and the user id: it compares these data with the structure of the buffer table to check that it
has all the information (e.g. primary keys) it needs to create/update records in the buffer table.
The K4 spreadsheet layout is based on an Excel file used as a template. This file usually gets inspiration from
the initial mockup and will include additional information before making it live in the dashboard:
• The K4 grid can be either static or dynamic: The P&L demo shows a static grid with fixed rows while the
HR and Sales budgeting demos use dynamic row fields (Employees and Products) to dynamically create
the rows based on the context (E.g. creating rows for the employees belonging to the selected Division).
• Conditional formatting
• Validation rules
• Excel hidden rows/columns
• Dynamic Row/Columns hiding
USERS’ MANUAL
Pag. 7 of 150
K4 Analytics | 2021.1 How does K4 work?
Filtered by the context, host data and SQL data are loaded in K4 Datasets. In the Excel template, the K4GET()
formula establish a read and write (for SQL) link between a cell and a Dataset. When users click Save in the K4
toolbar, K4 writes back from the Datasets to the SQL buffer tables.
• The different datasets may have different granularities (i.e. keys or dimensions). In the same template
you could, for example, combine monthly and yearly data.
• If the user changes data in different datasets, when he/she saves, data is updated in the different tables
at the same time.
• Since each cell has all the information to save back to the SQL database, you have the maximum freedom
in placing cells in the template layout.
• Each cell can be individually set to locked or editable either with a SQL calculation or an Excel formula.
• It is also possible to save back to the SQL database the calculation of an Excel formula.
When the Excel template is ready, it can be published to the K4 server using the template manager. Modifying
the template follows the same process. The developer will be able to add, for example, a new column with totals
or modify some color coding or change Excel calculations in the layout: this can be done in few minutes. When
published, the modified template is immediately available to all users.
USERS’ MANUAL
Pag. 8 of 150
K4 Analytics | 2021.1 What are the development steps?
Optionally you can set the Smart Tooltips to determine what will be shown in a pop-up window when the User
clicks a cell (e.g. Smart Audit Trails, Smart Data-Entry).
USERS’ MANUAL
Pag. 9 of 150
K4 Analytics | 2021.1 Configuring the SQL database
• PostgreSQL
• Redshift
• Snowflake
Let’s use an example to illustrate the required setup in the back-end relational database: we want to allow users
entering budget P&L data for each Year, ReportingCode, Month, Division and Version (the dimensions of our
budget). We need therefore, in the relational database (the example below is based on MS SQL Server), to:
Such a view is mandatory because K4 uses it to understand the data structure. If the view is missing,
you will get an error message when saving data.
USERS’ MANUAL
Pag. 11 of 150
K4 Analytics | 2021.1 Configuring the SQL database
K4 saves data using a temporary table in the backend database and therefore you will need to assign to the
SQL database user also a role capable of creating/deleting tables (in MS SQL Server ddladmin).
Important!
USERS’ MANUAL
Pag. 12 of 150
K4 Analytics | 2021.1 Configuring the SQL database
• When the tables/views for K4 are created inside an existing SQL database containing a large number of
objects, it is recommended to create a schema to contain the K4 objects.
USERS’ MANUAL
Pag. 13 of 150
K4 Analytics | 2021.1 Configuring the SQL database
Connection String
K4 connects to the backend SQL database using a connection string.
The connection string must be stored in a text file located in the K4 folder on the server in
\K4\App_data\connections.
The connection string file can be created either manually or using the Database Connections Manager.
Important!
The syntax used in K4 connection strings is specific to K4: please follow the syntax described in K4
documentation.
MySQL support
K4 integrates directly with MySQL thanks to Connector/Net, the fully-managed ADO.NET driver for MySQLand
must be installed where K4 Server is installed.
MYSQL_AZURE:Server=myServer;Port=3306;Database=myDatabase;Uid=myUser;Pwd=myPassword;;e.g
• MYSQL_AZURE:Server=localhost;Port=3306;Database=K4_GETTING_STARTED;Uid=k4;Pwd=k4;
Important!
• The character set must be set in the connection string in order to manage fields/tables with
characters such as è, é, etc.
Oracle support
K4 Analytics can connect to Oracle using Oracle Provider for OLE DB and must be installed on the same
sever as K4 Server is installed.
The syntax of the K4 connection string is:
E.g.
OLEDB.NET=True
USERS’ MANUAL
Pag. 14 of 150
K4 Analytics | 2021.1 Configuring the SQL database
Snowflake support
K4 can connect to Snowflake through the Snowflake ODBC driver which must be installed on the K4 server.
E.g.
ODBC_SNOWFLAKE:DSN=K4SNOWFLAKE_PNL;Uid=K4ANALYTICS;Pwd=xyz123;eq06548.eu-west-
1.snowflakecomputing.com;db=K4_PNL;schema=PUBLIC
ODBC_SQL:DSN=myDSN;Uid=myUser;Pwd=myPassword;
E.g.
ODBC_SQL:DSN=azureK4GETTINGSTARTED;Uid=k4admin;Pwd=goK$lls2020;
E.g.
USERS’ MANUAL
Pag. 15 of 150
K4 Analytics | 2021.1 Configuring the SQL database
Redshift support
K4 can connect to Redshift through the Amazon Redshift (x64) ODBC driver which must be installed on the K4
server.
ODBC_REDSHIFT:Driver=Amazon Redshift
(x64);Server=myServer;Database=myDatabase;Uid=myUser;Pwd=myPassword;Port=5439;
E.g.
Important!
For more details please refer to the Databases section of K4 Installation Guide.
USERS’ MANUAL
Pag. 16 of 150
K4 Analytics | 2021.1 Configuring the SQL database
It can be accessed in the K4 properties manager via the related toolbar icon:
http://[myserver]/K4/K4_DTB_Connections.aspx
e.g.
http://localhost/K4/K4_DTB_Connections.aspx
USERS’ MANUAL
Pag. 17 of 150
K4 Analytics | 2021.1 Configuring the SQL database
\K4\App_Data\connections
K4 can manage an automatic caching of the meta-data in order to improve performance: the meta-data cache
is created for each connection string and stored in a file located in
\K4\App_Data\connections\cache
The cache file name is the same as the connection string text file plus .cache.js
\K4
Important!
• The cache file is created automatically by K4 the next time a user accesses a K4 object.
• If you make any change in the back-end SQL database you will have to delete the cache file to make
K4 automatically create an updated cache or you can use the Database Connections Manager Refresh
Cache optionto re-generate an updated cache file
• The cache is created with the Schema set in the K4 property: if you want to access different schemas
in the same database you will have to use a different connection string file for each schema.
USERS’ MANUAL
Pag. 19 of 150
K4 Analytics | 2021.1 Configuring the SQL database
Important!
E.g.
USERS’ MANUAL
Pag. 20 of 150
K4 Analytics | 2021.1 Configuring the SQL database
Therefore, if you want K4 to always filter SQL data by the current user, simply add the user as
K4_CURRENTUSER in the K4V views.
USERS’ MANUAL
Pag. 21 of 150
K4 Analytics | 2021.1 Managing Excel templates
In the P&L model below, the Budget cells are designed for data entry, to be saved in the Budget field of the
PnL_Budget table. Each Budget cell refers to primary keys:
• Year, Month, Division and version that are driven by the current selection
• Reporting code, identified by the cell row in the grid
The K4GET() formula in the Budget cell needs to know which table, which field and which reporting code.
The K4 web service will save the Budget cell value in the table, knowing the primary keys from the K4GET()
information + the dashboard context and updating the record in the buffer table.
USERS’ MANUAL
Pag. 22 of 150
K4 Analytics | 2021.1 Managing Excel templates
As shown in the HR demo, it is also possible to manage dynamic grids, filtered by the current context. In this
example, selecting a Division will provide a list of employees. Each employee in the grid will get 2 rows. In the
template, you just need to describe the cells for 1 employee. It can be 1 or more rows, starting at the k4dim1
cell, representing the Employee key ID, and ending before the k4end cell.
In the application, the Employee block (2 rows) will be replicated for every selected employee.
USERS’ MANUAL
Pag. 23 of 150
K4 Analytics | 2021.1 Managing Excel templates
Each dataset has a name and a number of measures: these are referenced in the cell formula using the K4GET()
function. This technique is extremely powerful and flexible at the same time:
• The different datasets may have different granularities (i.e. keys or dimensions). In the same template
you could, for example, combine monthly and yearly data. The schema below shows how to create the
two SQL datasets used in the same HR template:
• If the user changes data in different datasets, when he/she saves, data is updated in the different tables
at the same time.
• Since each cell has all the information to save back to the SQL database, you have the maximum freedom
in placing cells in the template layout.
• It is also possible to save back to the SQL database the calculation of an Excel formula.
Important!
• If you are not using , then cell A1 in the first sheet must be always left empty.
• If you are not using Hide Row/Columns, then Column A must not be left blank.
• From K4 Analytics 2020.2 Virtual Records are automatically managed by K4.
• Please ensure to uncheck the Locked setting under Protection tab for each editable cell .
n
USERS’ MANUAL
Pag. 24 of 150
K4 Analytics | 2021.1 Managing Excel templates
K4 does support the conditional formatting set in all the cells of the Excel template.
Columns filtering
In static templates (without rows dynamic generation) it is possible to define standard Excel filters in the Excel
template. The filters will be kept when the template is used in K4.
For columns filtering with rows dynamic generation please see Columns filtering in templates with dynamic
rows.
USERS’ MANUAL
Pag. 25 of 150
K4 Analytics | 2021.1 Managing Excel templates
This custom function fetches data from the host and SQL datasets and accepts the following parameters:
USERS’ MANUAL
Pag. 26 of 150
K4 Analytics | 2021.1 Managing Excel templates
MOD1 01 345 12 46
MOD2 02 220 3 98
MOD3 01 75 0 15
=K4GET("INVOICES","RETURNS","MODEL:MOD2;MONTH:02")
Important!
• Everything is case sensitive (dataset, fields and keys names, keys values)
• K4GET functions cannot be nested i.e. it is not possible in the K4GET function to refer to a cell
containing a K4GET formula.
• The parameters separator (in K4GET as in all others K4 custom functions) depends on the Windows
Regional Settings. For English is comma, it may be different in other languages (e.g. semicolon in
French).
• Cells containing text measures must be set to Text Format in the Excel template.
• If you are experiencing, when exporting from K4 to Excel, incorrect font sizes, please follow these
guidelines for the cells containing the K4GET function:
o Set the cell font size to 9, 12 or 18
o Set the cell vertical alignment to center
K4 will save back to the table in the indicate field the result of the formula. The indicated keys, together with
the document current selection and the eventual value of the Context property, will be automatically matched
to the table primary keys. The formula must start with =.
If the cell belongs to a zone to be cloned based on the dynamic row fields (please see Dynamic rows generation.),
the formula must be set in a way to be dynamic (e.g. using the Excel function ROW()).
E.g.
Important!
The table pointed by the K4SAVE function must be included in the K4 SQL datasets.
USERS’ MANUAL
Pag. 27 of 150
K4 Analytics | 2021.1 Managing Excel templates
It is possible to manage the dynamic creation of cells containing a total of a cell (for the same column) contained
in the cloned section by using the custom function K4SUM.
=K4SUM(ROW(F5))
1 Row number of the The cell row must be indicated with ROW(F5)
cell to be summed the Excel function ROW().
The User can interactively lock/unlock cells containing a total of editable cells. When a total is locked, changing
one cell by editing it or more cells by using the toolbar copy/paste buttons will determine a change of the other
editable cells belonging to the same total so that the total remains unchanged.
By default, K4 will automatically make lockable/unlockable cells containing, in the template, the function
K4SUM.
USERS’ MANUAL
Pag. 28 of 150
K4 Analytics | 2021.1 Managing Excel templates
It is also possible to enable the locking/unlocking of additional cells containing a total (e.g. a row total) of editable
cells by using the custom K4SUMLOCK function in the template.
The K4SUMLOCK function must be placed in a cell and point, through its 2 arguments, to the cell containing
the SUM we want to make lockable.
USERS’ MANUAL
Pag. 29 of 150
K4 Analytics | 2021.1 Managing Excel templates
USERS’ MANUAL
Pag. 30 of 150
K4 Analytics | 2021.1 Managing Excel templates
• the value of a parameter coming from the current selection / K4 context / the property
example =K4VALUE(“Month”)
returned value 03
returned value 3
MOD1 01 345 12 46
MOD2 02 220 3 98
MOD3 01 75 0 15
example =K4VALUE("K4_SalesBudgeting_Input-B,K4_SalesBudgeting_Input-OA,K4_SalesBudgeting_Input-
WF,K4_SalesBudgeting_Input-RF",2)
notes The index may be a number or refer to a cell. A negative index will extract the n-th from the list
bottom.
• the n-th value of a list from a parameter coming from the current selection
USERS’ MANUAL
Pag. 31 of 150
K4 Analytics | 2021.1 Managing Excel templates
example =K4VALUE("Month",2)
returned value 04
The index may be a number or refer to a cell. A negative index will extract the n-th from the list
bottom.
• the n-th value of a list where n is the position of a parameter (coming from the current) in a second list
• the n-th value of a list where n is the position of a value in a second list
example =K4VALUE(3,"K4_SalesBudgeting_Input-B,K4_SalesBudgeting_Input-
OA,K4_SalesBudgeting_Input-WF,K4_SalesBudgeting_Input-RF")
Template check-boxes
In a template it is possible to format a cell as a check-box not only if it contains the K4GET function (for data-
entry) but also if it is a simple cell.
In order to format a cell in the template as a check-box even if there is no K4GET function in the cell, you can
use named ranges: K4 will automatically format as check-boxes all cells belonging to named ranges having a
name starting with k4checkboxes (all lowercase). E.g. k4checkboxes, k4checkboxes_1, k4checkboxes003, etc.
This, in combination with the ability of hiding rows/columns dynamically based on an Excel formula, could be
extremely helpful when you are using K4 for complex simulation models or to manage a rich data-entry form
(e.g. survey data) where you want to conditionally display/hide sections of the template.
USERS’ MANUAL
Pag. 32 of 150
K4 Analytics | 2021.1 Managing Excel templates
USERS’ MANUAL
Pag. 33 of 150
K4 Analytics | 2021.1 Managing Excel templates
The Template Manager can be accessed in the K4 properties manager via the related toolbar icon:
http://[myserver]/K4/K4_TemplateManager.aspx
e.g.
http://localhost/K4/K4_TemplateManager.aspx
Important!
USERS’ MANUAL
Pag. 34 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
• The excel template file name should not contain any spaces as this may impact the load of K4 grid.
• Every time an Excel template is modified you need to republish it.
• If you are not using Data-Entry Validation, then cell A1 in the first sheet must be always left empty.
• If you are not using Hide Row/Columns, then Column A must not be left blank.
• From K4 Analytics 2020.2 Virtual Records are automatically managed by K4.Please ensure to
uncheck the Locked setting under Protection tab for each editable cell .
n
•
The K4 server component is common and can even serve different platforms at the same time. Layouts,
templates and database connections can be shared across platforms.
Please see the specific K4 Platform Guide for more details on how to add and configure the K4 object.
USERS’ MANUAL
Pag. 35 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
• Data Table for editing data of SQL tables containing dimensions and
measures
• Master Table for managing SQL master tables, i.e. tables containing a data
item (e.g. products, customers, accounts, versions, etc.) and their attributes
(e.g. product line, brand, etc.). For more details please see Using K4 to edit
master tables.
USERS’ MANUAL
Pag. 36 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
WORKSHEET
Settings
Template Name of the template file without extension (e.g. K4_PnL_demo_PnL).
For more details on managing template files please see Managing Excel
templates.
Template Sheet In case of a template with multiple sheets, this number sets the sheet used by
Number / Label K4. E.g. 2 indicates the second sheet.
In alternative to setting the template active sheet by number, it is also possible
to use the sheet name (case-sensitive).
Dynamic Row We can set a group of template’s rows to be automatically cloned for each value
Fields of a given dimension (e.g. MODEL). The current version supports up to nine
dynamic dimensions. For more details please see Dynamic rows generation.
Dynamic Row Please see Columns filtering in templates with dynamic rows.
Filtering
Dynamic
Columns Fields Please see Dynamic columns generation
Named Cells This property allows updating template’s named cells with values coming from
the Tableau dashboard.
E.g. currentYear:2019;LastReview:201812
2019 will be copied in the Excel template cell named currentYear and 201812 in
the cell named LastReview.
USERS’ MANUAL
Pag. 37 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
It displays a gray overlay on the background and can be closed by pressing the
esc key in the case where the message is still displayed following load of K4 grid.
The property Treat nulls as, when set to nulls, allows distinguishing between zeros
and nulls and having an empty cell in correspondence of a null value.
This feature is especially useful to distinguish a budget value not yet entered
(null) from a budget value set to zero.
Display
Zoom % Sets the zoom to be used at load (e.g. 80). By default, K4 at load uses the zoom
set in the Excel template. It is also possible to interactively change the zoom of
the K4 grid by changing the zoom value in the toolbar:
It is possible to display repeated values even when the Developer Mode is off,
by setting to off this property. By default, Repeated Values are displayed with
Hide Dimensions grey background. This cannot be overwritten.
Repeated Values
Scrollbars
USERS’ MANUAL
Pag. 38 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Horizontal
scrollbar Display or hide the horizontal scrollbar.
Vertical scrollbar Display or hide the vertical scrollbar.
Cells Color
Editable Cells Select a color from the dropdown. Background color name for editable cells.
Color Default is light yellow. Accepted values are web color names (see
https://www.w3schools.com/colors/colors_names.asp)
Locked Cells Select a color from the dropdown. Background color name for locked cells.
Color Default is light blue. Accepted values are web color names (see
https://www.w3schools.com/colors/colors_names.asp)
Tabs
Display tabs strip Display or hide the bottom strip with sheets names.
Display only (tab If there are several sheets in the xlsx template, with this property you can list
names) the names of the ones you want to be displayed (comma-separated list).
Rows
Frozen Rows Number of top rows to be frozen during the vertical scroll.
Header - First
tab Display or hide the rows headers (with numbers) in the first sheet.
Header - Others Display or hide the rows headers (with numbers) in sheets other than the first
tabs one. This could be useful for example if we want to put in the second sheet
some instructions on how to use the K4 object and we don’t want to show the
rows header in this help sheet.
Hide by row This property allows dynamically hiding Excel template’s rows by indicating the
number rows numbers separated by comma. The rows numbers start with 0 indicating
the sheet first row.
Columns
Frozen Columns Number of left columns to be frozen during the horizontal scroll.
Header - First
tab Display or hide the columns headers (with letters) in the first sheet.
Header - Others Display or hide the columns headers (with letters) in sheets other than the first
tabs one. This could be useful for example if we want to put in the second sheet
some instructions on how to use the K4 object and we don’t want to show the
columns header in this help sheet.
Hide by column This property allows dynamically hiding Excel template’s columns by indicating
number the columns numbers separated by comma. The columns numbers start with 0
indicating the sheet column A.
TOOLBAR
Display This property, when set to on icon click, hides the K4 toolbar at load: a
floating circular button will be displayed. When clicked, the toolbar will be
shown.
When set to always, the toolbar is displayed at load and the user can
interactively collapse it by clicking the last toolbar button on the right.
A floating circular button will be displayed. When clicked, the toolbar will
be shown.
If data are changed when the toolbar is collapsed, a second button will
automatically be displayed. Clicking it will save changed data.
Smart Paste Activates Smart Paste toolbar button. For more details please see Smart
Paste.
Undo Activates Undo / Redo toolbar buttons. For more details please see Undo
/ Redo.
Template Manager Shows / hides the Template Manager icon in the toolbar.
Hide icons in Toolbar Through this property, it is possible to hide individual toolbar elements.
Each element has an internal lowercase code:
USERS’ MANUAL
Pag. 40 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Dynamic Menu[string] This property allows configuring the K4 toolbar dynamic menu. For more
details please see K4 Dynamic Menu.
Custom help If the property Custom Help has a value a green help icon will be shown
on the toolbar . If the expression starts with http the link will be
opened otherwise a new browser page containing the expression value will
be opened.
If the custom help is set to an http address please make sure that it is
accessible by opening in a web browser.
d. Click Add.
You will be then be able to open the html document at the bookmark
location by using the bookmark name as an anchor:
e.g. http://myserver/K4/docs/MyHelp.htm#myBookmark
Icon Labels With this property, it is possible to add a text label to each toolbar icon
(identified by its internal lowercase code).
USERS’ MANUAL
Pag. 41 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
The syntax is: [icon code 1]:[label 1]; [icon code 2]:[label 2]
FILTERING/SYNCRONIZATIO
N To be documentedAll properties not documented.
DEVELOPMENT OPTIONS
Designer Activates Designer Mode. For more details please see K4 Designer Mode.
USERS’ MANUAL
Pag. 42 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
The list of values used to generate template rows is fetched on the fly through a SQL query. This is very
important because it allows having rows for items not yet loaded in the dashboard and therefore be able to
enter data against them.
K4 will automatically clone the group of template rows between the one having k4dim1 in the first column and
the one with k4end in the first column.
The keys parameter in the K4GET function in the template should be set with an Excel formula in order to make
it dynamic based on the row.
E.g.
E.g.
='MODELS:MODEL'
Important! When using a view, it is important to include in it all fields that may be included in the dashboard
selection and K4 object context. Since K4 automatically filters the view based on matching fields coming from
the selection/context, doing so will ensure that the query returns only the required data.
E.g.
MODELS:MODEL
USERS’ MANUAL
Pag. 43 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
where MODELS is the name of the table and MODEL the name of the field
For each field value K4 will clone the group of rows between the one having k4dim1 in the first column and the
one with k4end in the first column, replacing the * cell with the field value.
E.g.
MARKETS_MODELS:MARKET,MODEL
For each couple of fields values K4 will clone the group of rows between the one having k4dim1 in the first
column and the one with k4end in the first column, replacing the k4dim1 cell with the first field value and the
cell containing k4dim2 with the second field value.
E.g.
MARKETS_MODELS:MARKET,BRAND,LINE,MODEL
USERS’ MANUAL
Pag. 44 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Important!
With two or more row fields, subsequent repeated values are automatically hidden (white font on white
background).
Values are shown (black font on gray background) when the Developer Mode is active.
USERS’ MANUAL
Pag. 45 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
• From a field of the K4 context by setting the field name between square brackets (e.g. [PRODUCT])
• From the dimension of a dataset (SQL or host) by setting the dataset name between square brackets
(e.g. [ACTUALS])
USERS’ MANUAL
Pag. 46 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
In a similar way to dynamic rows, it is possible to set a group of template’s columns to be automatically cloned
for each value of a given dimension (e.g. MONTH). The current version supports one dynamic dimension which
is set in the Dynamic Columns Fields property.
K4 will automatically clone the group of template columns between the one having k4col1 and the one with
k4colend in the second row of the template.
USERS’ MANUAL
Pag. 47 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
A button in each column allows displaying a pop-up panel from where rows can be filtered by checking /
unchecking values or by search:
USERS’ MANUAL
Pag. 48 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
When conditional formatting has been used in the template, it is also possible to filter based on cells color.
USERS’ MANUAL
Pag. 49 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
How to configure it
To activate the filtering, set to on the property Dynamic Rows Filtering in the K4 layout.
K4 will add the filtering to all the template columns between the column containing the first dimension
placeholder k4dim1 and the first column with an empty cell in the row above (e.g. row 7in the screenshot below).
Important!
Columns sorting
When working with dynamic rows, if the option Dynamic Rows Filtering is on, it is also possible to interactively
sort the rows in ascending/descending order.
Important!
USERS’ MANUAL
Pag. 50 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
• The headers row in the template should not contain any empty cell and must be right above the row
with the k4dim cells.
• Sorting is not active if there are more than 1 row in the template Dynamic Rows block
Resizable columns
When the column headers are displayed, the end user can now interactively resize columns.
A double-click on the right edge, as in Excel, will automatically resize the column.
USERS’ MANUAL
Pag. 51 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
SQL datasets
In this section, you can set one or more (up to 10) SQL tables which will be queried, filtered by the dashboard
context, every time K4 is refreshed.
The SQL datasets data are referenced in the K4 template using the K4GET function:
If a cell is editable, when its value is changed and the user clicks the Save toolbar icon, new values are saved
back to the SQL database.
USERS’ MANUAL
Pag. 52 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Connection settings
SQL Settings
Connection Click to select the connection string file to be used to connect to the
string file backend database. For more details please see Connection String
Schema If left empty K4 will use the SYSTEM schema as default for Oracle and dbo
for MS SQL Server. It is possible to use different schemas for tables and
views. Setting in this property two schemas separated by a comma (e.g.
='SCHEMA_A,SCHEMA_B' ) , will make K4 use the first schema for tables
(e.g. SCHEMA_A) and the second one for views (e.g. SCHEMA_B ).
Additional This property allows setting additional filters to be used in the WHERE
filters condition of SQL queries. The syntax is:
E.g. phase:review;scenario:optimistic
Cascade Lists Through this property, it is possible to define two drop-downs linked in
cascade (only for the fields of one dataset).
The fields must be listed from the upper level to the lower in rows
separated by ;.
The first row must contain the comma-separated fields names and the
following the comma-separated values.
state,city;NY,New York;CA,Los Angeles;TX,Dallas
status2,status;on hold,approved;approved,approved;rejected,approved
USERS’ MANUAL
Pag. 53 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
It is also possible to fetch the cascade lists from the SQL database:
1. Create a SQL dataset with the two cascaded fields as dimensions and with no measure.
2. Set the name of the dataset between [ and ] in the Cascade Lists property (e.g. [STATUS_CASCADE]).
USERS’ MANUAL
Pag. 54 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Dataset settings
Active Select on to make the dataset active. When set to off, the table will not be queried.
Click here to select the SQL table.
Table
Dimensions Type here the comma-separated list of the dimensions (keys). These are the keys to
be referenced in the template K4GET function (in the same order) third parameter.
Virtual This property is no longer used in K4 2020.2 or later. It is still active only
Records
View to provide retro-compatibility with objects created with previous releases.
Smart This property switches on / off the display of audit trails in the pop-up window.
Audit Trails
The sortable and searchable table contains the information, for each change, about
who made the change, when and the previous value.
This requires the optional K4 module Audit Trails. Please see the related users’
manual for more details.
USERS’ MANUAL
Pag. 55 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Measures settings
For each dataset, you can manage up to 50 different measures (i.e. a SQL field or a calculation).
Measure n Select the field from the drop-down list or type a SQL calculation (label mandatory)
in the top formula box.
Type Set the cell data-type. For more details please see SQL Measures data-types.
Editable Set if the cell is editable or read-only. It can be also managed cell by cell with a field /
SQL calculation giving -1 or 0.
• -1 cell is locked
• 0 cell is editable and changes are saved to the SQL database
E.g. case when status='approved' then -1 else 0 end
List Sets the values to be managed through a drop-down list. Type the list of
comma-separated values.
E.g.
Authorized,On hold,Rejected
SQL Allocation Driver Sets the SQL allocation driver. For more details please see SQL-based allocation (MS
SQL Server).
Smart Tooltip Form Activates the data-entry of the measure in a form in the Smart Tooltip pop-up form.
For more details please see Data-entry form.
Label Label used in the Smart Data-Entry panel.
Tooltip Field or SQL calculation to be used as cell tooltip.
Color Type the name of the field / SQL calculation to be used as cell background color.
Accepted values are web color names (see
https://www.w3schools.com/colors/colors_names.asp).
USERS’ MANUAL
Pag. 56 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Background Image Type the name of the field / SQL calculation to be used as cell background image.
• a full URL
or
• file name+extension. The file must be located on the K4 server in the folder:
\K4\App_Files\imgs
E.g.
PROD03056.jpg
It is possible to set how the image displays by adding x| in front of the image full name
where x can have the following values:
cell
By default, the image displays in the upper left corner of the cell with its original size.
Images are not exported to Excel.
It allows setting a default value (numeric or text) for cells corresponding to non-
existing records. A simple click on the Save icon will save all default values.
It can be used also to set the default value equal to a dataset field with the
syntax
The dataset can be either host or SQL. It must have the same dimensions.
The Smart Data-Entry property must be set to on.
USERS’ MANUAL
Pag. 57 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Important!
If you need to manage a dataset with more than 20 measures, you can do so by setting the next dataset to have
the same table and dimensions. K4 will automatically threat them (2 or more) as a single dataset.
USERS’ MANUAL
Pag. 58 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Check-boxes
Fields listed here (comma separated) will be managed as check boxes. In SQL Server the field data type must be
set to bit while in Oracle and MySQL it must be set to integer.
Dates
K4 supports the data-entry of dates. The related field in the SQL table must be set to a date data type (e.g.
smalldatetime)
When the user double-clicks the cell, a pop-up calendar will be displayed to enter/modify the date.
USERS’ MANUAL
Pag. 59 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
USERS’ MANUAL
Pag. 60 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Important!
Please make sure first that the connection string cache is up-to-date.
USERS’ MANUAL
Pag. 61 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Host datasets
It is possible to display in the K4 object data calculated by the hosting platform (e.g. Power BI, QlikView, Qlik
Sense, Tableau, etc.) by configuring the Host Dataset(s).
It will be then possible to refer to the host dataset(s) in the template using the K4GET function to place each
value in a different cell. This way it is therefore possible to merge in the K4 template data coming from the
hosting dashboard (e.g. Actuals) with data coming live from the SQL database (e.g. Budget).
Please see the specific K4 Platform Guide for more details on how to configure the dataset(s).
USERS’ MANUAL
Pag. 62 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
K4 Designer Mode
When Designer Mode is active, clicking the icon in the K4 toolbar, will open a window above the K4 object
with the following information:
• Various settings (version, template, connection string file) and elapsed time details
• Context (list of filters, parameters and marks).
• Dynamic Row Fields values
• Host dataset(s) records
• SQL dataset(s) query and records
USERS’ MANUAL
Pag. 63 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Dynamic row fields and datasets are presented in a table that allows filtering and sorting:
K4 Context
USERS’ MANUAL
Pag. 64 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
The K4 context allows managing parameters inside the K4 object, letting the user set interactively their values
in a sliding panel on the left of the K4 grid.
Every time a parameter value is changed, the K4 grid automatically refreshes. It is also possible to disconnect
the K4 grid, change multiple parameters and refresh the grid.
Being integrated inside K4, it means that we can avoid managing these parameters inside the hosting BI platform
and therefore greatly simplify integrating a K4 object in the hosting dashboard. A classic example would be using
K4 to enter budget figures by version in a dashboard where we have actual data. We want to display both actual
and budget figures in the K4 object with the user able to change the version. The version field is not part of the
actuals data model. We can manage the version as a parameter in the K4 context without having to include it
in the actuals data model. Values for the version can even come dynamically from a cached versions table (please
see Getting parameter values from a cache table for more details).
How to configure it
USERS’ MANUAL
Pag. 65 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
The user can click the context icon to show/hide the panel:
Parameters
The grid allows configuring up to 50 parameters.
Panel
Allows grouping parameters in a collapsible panel section.
Parameter
Parameter name
Label
Parameter label displayed in the context panel.
Active
Determines (on/off) if the parameter is included in the K4 context.
USERS’ MANUAL
Pag. 66 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Type
Parameter Type Description Example
USERS’ MANUAL
Pag. 67 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Values
For parameters of type Single and Multiple Select set here the list of comma-separated valid values.
e.g. budget,revision1,revision2
e.g. BDG:budget,REV1:revision1,REV2:revision2
The text before the : will be set as the parameter value. The text after the : will be used as a label in the select object.
For parameters of type Slider set here the input range min and max (mandatory).
e.g. 1500,4500
e.g. 1500,4500,500
USERS’ MANUAL
Pag. 68 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Default
Type here the default value for parameters of type Single / Multiple Select, Number, Text and Slider.
Table
Please see Getting parameter values from a cache table
Codes Field
Please see Getting parameter values from a cache table
Labels Field
Please see Getting parameter values from a cache table
Grouping Field
Not used in this K4 version.
USERS’ MANUAL
Pag. 69 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Managing labels
It is also possible to manage labels for the parameter values by setting the column Labels Field (e.g.
VERSION_DESC).
USERS’ MANUAL
Pag. 70 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
In order to avoid the automatic K4 refresh at every context parameter change, it is possible to disconnect the
K4 grid, change multiple parameters and the reconnect the grid.
2. Change parameters.
3. Click the connect icon to refresh K4 (with the new context).
Limitations
• A parameter cannot be used to change the template property.
• The same parameter cannot be used in both K4 Context and K4 Dynamic Menu.
• In Internet Explorer 11 (and therefore in QlikView Desktop), the context panel, instead of sliding from
the left, is overlaid on top of the K4 grid.
USERS’ MANUAL
Pag. 71 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
K4 Dynamic Menu
The K4 Dynamic Menu provides a simple way of setting, through a choice from 2 or more values, what we call
a K4 parameter.
The menu is made of one or more items each made of a list of options. Each option can be used to assign a
value to up to 4 K4 variables. Items are separated by a divider line and the current value of the variable is
highlighted with a red tick.
USERS’ MANUAL
Pag. 72 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
How to configure it
• In the Menu Item column type the menu item label (e.g. DISPLAY TABS).
• In the Option column type the option label (e.g. display).
• Type the name of the variable/parameter in the Variable 1 column (e.g. vTabs).
• Type the value to be assigned to the Variable in the Variable 1 Value column (e.g. on).
You can set a menu item with multiple options in a single row:
• In the Menu Item column type the menu item label (e.g. RATIO)
• Leave the Option column empty
• Type the name of the variable/parameter in the Variable 1 column (e.g. vRatio)
• Type the list of comma-separated values in the Variable 1 Value column (e.g. hide,display). It is possible
to manage a value and a label for each option by separating them with a colon (e.g. off:hide,on:display)
USERS’ MANUAL
Pag. 73 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
It is also possible to update multiple variables/parameters (up to 4) with each option: it requires to set each
option in a different row:
As for other sections of the layout, K4 will replace parameters between < and > with the values of the
corresponding filter/parameter from the host platform context. This can also be used to set the value (on or off)
in the Active column and therefore activating/deactivating dynamically items in the menu.
Limitations
• A parameter cannot be used to change the template property.
• The same parameter cannot be used in both K4 Context and K4 Dynamic Menu.
USERS’ MANUAL
Pag. 74 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
This for previous releases compatibility and to manage special cases where the string comes from the host
platform.
Each option consist of the option value and the (optional) option label separated by : (colon). Options are
separated by comma. Multiple groups must be separated with ; (semicolon).
E.g. vRatio:RATIOS=hide,display;vAction:ACTIONS=hide,display
When the user selects the option hide in the group RATIOS, the value hide is assigned to the K4
variable vRatio. The variable is then sent to the K4 spreadsheet where its value is placed in the cell named vRatio.
The K4 spreadsheet is then refreshed.
E.g.
vRatio:RATIOS=hide,display;vAction:ACTIONS=hide,display
It is also possible, with each menu item, to set multiple parameters. The parameters must be listed at the beginning,
separated by -. The corresponding values for each item must be also set separated by -.
Menu Item
vkLevel vkSheet
Label
USERS’ MANUAL
Pag. 75 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
Category CATEGORY 1
Account ACCOUNT_GRO 2
Group UP
Account ACCOUNT 3
vkLevel-vkSheet-vkRows:INPUT LEVEL=CATEGORY-1-CATEGORY!CATEGORY:Category,ACCOUNT_GROUP-2-
ACCOUNT_GROUP!CATEGORY/ACCOUNT_GROUP:Account Group,ACCOUNT-3-
K4H_ACCOUNT!CATEGORY/ACCOUNT_GROUP/ACCOUNT:Account
Menu Item
vkLevel vkSheet vkRows
Label
Important!
In values:
USERS’ MANUAL
Pag. 76 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
This means that we can not only use parameters from the hosting platform but also the parameters managed
with K4 dynamic menu and K4 context to dynamically change the layout (with the exception of the Template
property).
For example, we can set the Template Sheet Number to <vSheet> and use the dynamic menu to change the
value of the parameter vSheet.
Important!
If the parameter value is numeric, we can also use basic calculations (add/subtract a value, multiply/divide by a
number):
Today function
<today()> is automatically replaced with the current date in the format YYYY-MM-DD
USERS’ MANUAL
Pag. 77 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
K4 context menu
Right-clicking on one or more selected cells, will now display a menu allowing to:
When Smart Data-entry is launched from the context menu, it will just be activated one-shot. If you activate it
using the toolbar icon, it will remain active until you switch it off by re-clicking the icon.
USERS’ MANUAL
Pag. 78 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object
▪ enter in a pop-up form the fields with the property Smart Tooltip Form is set to on
This feature can be extremely useful to simplify templates by reducing the number of columns: part of the data-
entry fields can be managed, instead that in a column, in the pop-up form.
USERS’ MANUAL
Pag. 79 of 150
K4 Analytics | 2021.1
▪ Display in a pop-up form the Smart Links (please see K4 object properties – Smart Links for more
details).
▪ Execute SQL stored procedures (see SQL stored procedures for more details)
▪ Filter the dashboard based on fields set in the property Outgoing Fields (please see Setting the K4
object properties for more details).
USERS’ MANUAL
Pag. 80 of 150
K4 Analytics | 2021.1
Hiding rows
The property Hide based on first column must be set to at load.
The template must have a first column with the value hide or a formula which evaluates to hide in the rows we
want to hide. This column will be automatically hidden by K4.
Important!
When managing dynamic rows, the k4dim1 and the k4end should be in the second column in the template.
Hiding columns
The property Hide based on first row must be set to at load.
The template must have a first row with the value hide or a formula which evaluates to hide in the columns we
want to hide. This row will be automatically hidden by K4.
USERS’ MANUAL
Pag. 81 of 150
K4 Analytics | 2021.1
In the template below we want to hide the columns between U and AJ if the Division is B (where Division is a
named cell): we therefore put the formula =IF(DIVISION=”B”, “hide”,””) in first row cells from U1 to AJ1.
This could be used for example in a Profit & Loss data-entry to display detailed rows only when a specific value
is entered in the summary row.
Or in a data-entry form to display rows depending on the User’s input in a given cell where maybe we have a
drop-down list.
To hide rows at every recalculation, set the property Hide based on first column to automatic recalc.
To hide columns at every recalculation, set the property Hide based on first row to automatic recalc.
USERS’ MANUAL
Pag. 82 of 150
K4 Analytics | 2021.1
How to configure it
1. In the K4 settings set the Datasets property to indicate the comma-separated list of datasets. Datasets
names are case-sensitive.
2. In the Excel template create an empty sheet for each dataset. The sheet name must be set to dataset_
plus the dataset name e.g. dataset_Actions.
If a dataset contains more than one dimension, K4 will automatically add a first column that contains the
concatenation of all dimensions values in order to be able to the VLOOKUP on this column.
USERS’ MANUAL
Pag. 83 of 150
K4 Analytics | 2021.1
In this example we want to display a recommended action based on the entered status value, the P&L line
and the selected DIVISION. The actions come live from the SQL table ACTIONS.
USERS’ MANUAL
Pag. 84 of 150
K4 Analytics | 2021.1
USERS’ MANUAL
Pag. 85 of 150
K4 Analytics | 2021.1 Smart Drill
Smart Drill
The Smart Drill feature is a major K4 feature: it allows, starting from one or more selected cells of the K4 grid,
to open a second K4 object (with its own layout) by automatically using the coordinates (K4GET keys) of the
selected cell(s) as additional elements of the new K4 object context.
A simple application could be using K4 to enter data at an aggregate level (e.g. by CATEGORY) and be able to
interactively select one or more categories in the K4 grid to drill down to view / change data by ACCOUNT. The
accounts are automatically filtered based on the selected categories.
When the smart drill is selected from the cell context menu (opened with a right-click), the master K4 grid is
hidden and the drill K4 object is displayed with an additional toolbar icon at the far right allowing to go back
(drill-up) to the master K4.
Important!
• From the drill grid it is not possible to smart-drill again, only to go back to the master K4 grid.
• If data is changed / saved at drill level and the same data are used in the master grid, the user must
refresh the master grid to see the changed data.
• Host datasets cannot be used in the drill layout.
USERS’ MANUAL
Pag. 86 of 150
K4 Analytics | 2021.1 Smart Drill
How to configure it
1. First of all you need to create and save to the K4 models library the drill layout. You can do so:
• In K4 Studio
• From the layout editor in QlikView, Qlik Sense and Tableau clicking the new button:
It is possible to set multiple smart drill and for each one configure:
Context [optional] This option allows adding parameters to the drill context.
E.g. STATUS:completed.
E.g. STATUS:completed;COUNTRY:USA,UK
Parameters set here will override parameters from the master and the
cell context. E.g. if you want to drill with all the 12 months, regardless
the month of the selected cell(s) you can use here:
MONTH:01,02,03,04,05,06,07,08,09,10,11,12
Required Parameters [optional] Here you can set required K4GET keys: the drill will be available in the
context menu only if the required keys are used in the K4GET of the
USERS’ MANUAL
Pag. 87 of 150
K4 Analytics | 2021.1 Smart Drill
clicked cell(s). For example when set to MONTH, the drill will be available
only from cells that in the template contain K4GET with MONTH in the
keys parameter. Multiple values can be set, separated by comma (e.g.
MONTH, DIVISION).
Required Measures [optional] Here you can set required K4GET measures: the drill will be available in
the context menu only if the required measures are used in the K4GET
of the clicked cell(s). For example when set to BUDGET, the drill will be
available only from cells that in the template contain K4GET with
BUDGET in the field parameter. Multiple values can be set, separated by
comma (e.g. BUDGET, FORECAST).
The Smart Drill feature can be also extremely effective when dealing with very complex and wide templates: the
drill layout can be designed to swap columns by row for a more ergonomic view of the starting row (the drill
template may even leverage live Excel charts):
USERS’ MANUAL
Pag. 88 of 150
K4 Analytics | 2021.1
If for example you configure the drill layout with new Dynamic Columns (see Dynamic columns for more details),
it is possible to drill to multiple non-contiguous months:
USERS’ MANUAL
Pag. 89 of 150
K4 Analytics | 2021.1 Views
Views
The concept of View represents a major feature in making easier and faster the usage and navigation of complex
spreadsheets. The end user can simply select a view by using the tabs displayed underneath the K4 toolbar.
• Hidden rows
• Hidden columns
• One or more named cells
The first view set in the layout is the one active when the K4 object is loaded / refreshed.
Each parameter (hidden rows, hidded columns, named cells) is optional. If they are all empty, the K4 grid is
loaded without hiding any row / column and without setting any named cell.
In setting hidden rows / columns you can indicate multiple rows / columns with numbers separated by comma
(e.g. 12,23,35) or a range (e.g. 41-60) or a combination of the two (e.g. 12,23,35, 41-60).
In the Named Cells parameter, you can set one or more pairs of named cell name and value separated by ;.
USERS’ MANUAL
Pag. 90 of 150
K4 Analytics | 2021.1 Views
e.g. startMonth:JAN;endMonth:MAR
When the end user selects a view, the corresponding rows/ columns are hidden and the template named cells
are set without reloading the K4 object.
Note
The tab CSS options are not yet active in the current release.
USERS’ MANUAL
Pag. 91 of 150
K4 Analytics | 2021.1 Print & export to PDF
Clicking the print/PDF icon will display a pop-up window where multiple printing/exporting options can be set:
USERS’ MANUAL
Pag. 92 of 150
K4 Analytics | 2021.1 Print & export to PDF
The default values for the printing/exporting options can be set in the related layout section:
will create a file with the name resulting from the concatenation of DIVISION,YEAR and MONTH.
USERS’ MANUAL
Pag. 93 of 150
K4 Analytics | 2021.1 Smart Links
Smart Links
Overview
The Smart Links feature allows the user to display a web page:
How to use it
Click the K4 toolbar icon to select a link. The symbol indicates a link that will be opened in a new browser
window.
USERS’ MANUAL
Pag. 94 of 150
K4 Analytics | 2021.1 Smart Links
To view the links configured to appear in a window, right-click a cell in the K4 grid and select Smart Links.
USERS’ MANUAL
Pag. 95 of 150
K4 Analytics | 2021.1 Smart Links
setting description
If the link does not start with http, it will be opened under the K4
server. E.g. App_Data/documents/mydoc3.pdf will open the file
mydoc3.pdf located in C:\Program
Files\K4\App_Data\documents
Mode Normal: the link will be opened at the place of the K4 grid. Clicking
the first icon in the K4 toolbar (Refresh), will re-display the grid.
Width Type the pop-up window width in pixels. If multiple smart links
have been configured for the same cell (i.e. same dataset), the
biggest width will be used.
USERS’ MANUAL
Pag. 96 of 150
K4 Analytics | 2021.1 Smart Links
Height Type the pop-up window height in pixels. If multiple smart links
have been configured for the same cell (i.e. same dataset), the
biggest height will be used.
SQL dataset Select from the drop-down the SQL dataset. The link configured
in this row will be displayed in the pop-up window only for cells
linked to the selected SQL dataset (through the K4GET function).
Host dataset Select from the drop-down the host dataset. The link configured
in this row will be displayed in the pop-up window only for cells
linked to the selected host dataset (through the K4GET function).
E.g. if:
• the dashboard is filtered by Customer_Code and the value CU020356 is currently selected
• the URL is set to:
http://myServer.com/crm/index.php?action=DetailView&module=Accounts&accountCode=<Customer_Code>
K4 will open:
http://myServer.com/crm/index.php?action=DetailView&module=Accounts&accountCode=CU020356
For links set Tooltip mode, all cell’s dimensions included in [ ] will be automatically replaced.
USERS’ MANUAL
Pag. 97 of 150
K4 Analytics | 2021.1 Documents’ gallery
Documents’ gallery
Overview
The K4 Documents Gallery allows displaying a gallery of documents (pdf, images, mp4 videos, Youtube videos).
Documents can be tagged to then use tags to filter them in the gallery.
Each document is presented as a card, when the user clicks it the document is opened.
• a thumbnail image
• title, subtitle and full description
• List of tags (categories)
USERS’ MANUAL
Pag. 98 of 150
K4 Analytics | 2021.1 Documents’ gallery
How to configure
setting description
Document Link of the document. Valid documents are all file types ‘openable’
by the browser. E.g. pdf, jpg, png, gif, mp4, etc.
If the link does not start with http, it will be opened under the K4
server from the App_Data/documents folder.
USERS’ MANUAL
Pag. 99 of 150
K4 Analytics | 2021.1 Undo / Redo
If you want to use a custom logo, simply create it as a png file and copy it to C:\Program
Files\K4\App_Data\documents with the name K4Gallery_logo.png. (make first a copy of the existing one …).
Undo / Redo
You can undo or redo data-entry actions. This feature is activated with the undo property.
USERS’ MANUAL
Pag. 100 of 150
K4 Analytics | 2021.1 Undo / Redo
It is also to undo changes by pressing CTRL-Z, although this is not always recorded in the actions list.
USERS’ MANUAL
Pag. 101 of 150
K4 Analytics | 2021.1 Undo / Redo
Important! When the Smart Data-Entry is active and the rows/columns coordinates are not shown, the action
descriptions will automatically use the field labels.
Important!
USERS’ MANUAL
Pag. 102 of 150
K4 Analytics | 2021.1 Smart Data-Entry
Smart Data-Entry
Overview
The Smart Data-Entry (SDE) feature has been designed to allow the user freely selecting a range of cells and
then quickly change from the top panel the editable cells in the selected range either by setting a new value for
each individual cell or by changing the total. It allows also copying values from another field or spreading a total
value based on a field selected as a driver. Single cells or groups of cells can be interactively held so that they
are not affected by changes. The examples below are based on the HR demo and database.
How to configure it
USERS’ MANUAL
Pag. 103 of 150
K4 Analytics | 2021.1 Smart Data-Entry
In order to activate Smart Data-Entry for a field of a SQL dataset, you simply have to set to on the Smart Data-
Entry property.
Copy fields
You can set a field to be copy-able from one or more other fields (they must share the structure – i.e. keys).
E.g. if you want the user to be able to copy into the field FTE_FORECAST of dataset FTE from either the field
FTE_BUDGET or the field FTE_ACTUAL (both from the host dataset called FTE_TBL), the property must be set to:
FTE_TBL!FTE_BUDGET,FTE_TBL!FTE_ACTUAL
Important!
Table name must not contain any blank or other special characters i.e. %,@,#
USERS’ MANUAL
Pag. 104 of 150
K4 Analytics | 2021.1 Smart Data-Entry
Driver fields
You can set a field to be used as an allocation driver to allocate the total (current value or new entered value)
to individual cells (target and driver fields must share the same structure – i.e. keys).
E.g. if you want the user to be able to allocate the total to the field FTE_FORECAST of dataset FTE based on
either the field FTE_BUDGET or the field FTE_ACTUAL (both from the host dataset called FTE_TBL), the property
must be set to:
FTE_TBL!FTE_BUDGET,FTE_TBL!FTE_ACTUAL
Important!
Every field included in this property must also be included in the property Smart Fields.
USERS’ MANUAL
Pag. 105 of 150
K4 Analytics | 2021.1 Smart Data-Entry
How to use it
When the user selects a range of cells and click the toolbar icon , K4 automatically detects the Smart Data
Entry fields contained in the selected range and displays a top panel from where the user can manipulate the
data:
Before clicking the Smart Data Entry icon, the user can hold/unhold cells by selecting them and clicking the
toolbar icons . Held cells will be highlighted with a small red lock image.
It is possible to select a range made by non-contiguous cells by selecting the first range of cells and then keep
CTRL pressed while selecting additional ranges.
USERS’ MANUAL
Pag. 106 of 150
K4 Analytics | 2021.1 Smart Data-Entry
Different actions can be performed on the selected range cells as described in the tables below:
Cells actions
Action
Step + Click
Setting a fixed value in all cells Type the new value in the “New Cell Value” box
Add a value to each cell Type in the “New Cell Value” box the value preceded
by + (e.g. +25)
Subtract a value from each cell Type in the “New Cell Value” box the value preceded
by - (e.g. -25)
Multiply each cell by a value Type in the “New Cell Value” box the value preceded
by * (e.g. *2)
Divide each cell by a value Type in the “New Cell Value” box the value preceded
by / (e.g. /2)
Increase each cell by a percentage Type in the “New Cell Value” box the value preceded
by % (e.g. %10)
Decrease each cell by a percentage Type in the “New Cell Value” box the value preceded
by %- (e.g. %-20)
Totals actions
Action Step + Click
Set the total of the selected cells to a new value Type the value in the “New Total” box
Increase the total of the selected cells by a value Type in the “New Total” box the value preceded by +
(e.g. +2500)
Decrease the total of the selected cells by a value Type in the “New Total” box the value preceded by -
(e.g. -2500)
Multiply the total of the selected cells by a value Type in the “New Total” box the value preceded by *
(e.g. *2)
Increase the total of the selected cells by a percentage Type in the “New Total” box the value preceded by %
(e.g. %10)
Decrease the total of the selected cells by a percentage Type in the “New Total” box the value preceded by %-
(e.g. %-20)
Copy actions
Action Step + Click
Copy in the selected cells values from another field Select the field to copy from the drop-down list
Copy in the selected cells values from another field Type in the “*” box the factor (e.g. 2)
multiplied by a factor
Select the field to copy from the drop-down list
Allocations actions
Action Step + Click
USERS’ MANUAL
Pag. 107 of 150
K4 Analytics | 2021.1 Smart Data-Entry
Allocate the current total of the selected cells based on a Select the driver field from the drop-down list
driver field
Allocate a new total value for the selected cells based on a Type in the “New Total” box the new total value
driver field
Select the driver field from the drop-down list
USERS’ MANUAL
Pag. 108 of 150
K4 Analytics | 2021.1 Smart Data-Entry
It is now possible to configure the copying to be done from other cells (instead of from datasets fields) using
relative references. The cells we are copying from may for example contain an Excel calculation.
How to configure it
In the measure Copy From property, set the relative reference (for rows, columns or both) followed by : (colon)
and the label.
The relative reference is set using the syntax RxCy where x is the row reference and y the column reference.
USERS’ MANUAL
Pag. 109 of 150
K4 Analytics | 2021.1 Smart Data-Entry
Some examples:
Copy from
It is possible to manage multiple copy from, simply by separating them with a comma.
E.g.
1. In the Excel template create, below the monthly data-entry row (row 6), one row for each
criterion. In the row cells (columns E to P) set the formula to split the yearly total in column D.
USERS’ MANUAL
Pag. 110 of 150
K4 Analytics | 2021.1 Smart Data-Entry
The end user can then simply use Smart Data-Entry to copy from the desired row.
USERS’ MANUAL
Pag. 111 of 150
K4 Analytics | 2021.1 Smart Paste
Smart Paste
The Smart Paste feature allows importing data from an Excel file.
How to activate
In the settings, set the property Smart Paste to on.
How to use it
A click on the Smart Paste button will display the following screen:
USERS’ MANUAL
Pag. 112 of 150
K4 Analytics | 2021.1
Data are pasted from the first sheet of the imported Excel file (including cells from hidden row and columns) to
cells not locked and not on hold by position.
As a best practice we recommend therefore to create the Excel file by exporting it from K4 first and to make
sure the dashboard context at the time of doing the Smart Paste matches the data contained in the Excel file.
USERS’ MANUAL
Pag. 113 of 150
K4 Analytics | 2021.1 Data-entry validation
Data-entry validation
It is possible to block entirely the saving or to display a warning message if some validation conditions are not
met. K4 will always check the content of the top left cell (A1) in the first sheet of the template:
• If the top left cell (A1) contains a string starting with ! K4 will disable the saving and display a pop-up
message after the user clicks on Save in the K4 Toolbar.
• If the top left cell (A1) contains a string not starting with ! K4 will display a pop-up message with a
confirmation request after the user clicks on Save in the K4 Toolbar.
Example
We want to allow saving data only when the total of the cells in C7:N7 is equal to 12.
You can use the formula in the top left cell to check as many conditions as you want. For example, the following
formula:
=IF(SUM(C7:N7) <>12,"!WARNING! The yearly total must be 12",
IF(COUNTIF(C7:N7,"<0"),"!WARNING! At least one cell is negative",
IF(COUNTIF(C7:N7,"*")>0,"!Warning! At least one cell contains letters","")))
Aggregate data-entry
USERS’ MANUAL
Pag. 114 of 150
K4 Analytics | 2021.1 Aggregate data-entry
Overview
K4 supports entering data also at an aggregated level. Since the template may contain multiple SQL dataset, this
means that K4, for each of them, will automatically detect if the dataset level is physical or aggregated and act in
accordance.
The following table illustrates and compares the two levels of data-entry: physical and aggregated.
Description All the table primary keys fields are uniquely All the table primary keys fields are not uniquely
(with a single value) identified, i.e. included in the identified. This may be due either to multiple
combination of: values selected for a primary key field (e.g.
Year:2017,2018) or to a field aggregating a
• K4GET function keys parameter primary key field (e.g. Quarter instead of Month).
• document current selection fields (or a combination of multiple values and
• optional context property fields
aggregating fields).
Data retrieval The SQL statement is generated by: The SQL statement is generated by:
USERS’ MANUAL
Pag. 115 of 150
K4 Analytics | 2021.1 Aggregate data-entry
USERS’ MANUAL
Pag. 116 of 150
K4 Analytics | 2021.1 Aggregate data-entry
We have one table, BUDGET_MONTH_PROD, where we want to store the budget values by PRODUCT,
VERSION, YEAR and MONTH in the numeric field CONTRIBUTORINPUT.
We have also two additional tables (PRODUCT and MONTH) containing the products hierarchy (products are
grouped into LINE, BRAND and SIZE – months are grouped by quarters).
USERS’ MANUAL
Pag. 117 of 150
K4 Analytics | 2021.1 Aggregate data-entry
Since K4 retrieves the SQL data from the view K4V_ BUDGET_MONTH_PROD, all the fields that could be used
for producing an aggregated level (e.g. LINE, BRAND, SIZE, QUARTER) must be included in the K4V_ view.
The aggregation fields in the K4_V view are also used to update existing records (spread-back).
In order to enable K4 to create new records (break-back), each table’s primary key must have a corresponding
hierarchy view.
Each hierarchy view must be named by concatenating the prefix K4H_ with the primary key name. E.g.
K4H_MONTH (the name must match the case of the primary key – K4H_month is wrong).
USERS’ MANUAL
Pag. 118 of 150
K4 Analytics | 2021.1 Aggregate data-entry
• If the cell previous value was zero, K4 selects (using the hierarchy contained in the K4_H_PRODUCT
view) the products belonging to the brand and splits equally the entered value among the products
belonging to the brand (this is called break-back). Eventual new table records are created automatically.
• If the cell previous value was different from zero, K4 updates the values of the products belonging to
the brand proportionally using the ratio between the previous brand value and the entered value (this
is called spread-back). This will use the K4V_BUDGET_MONTH_PROD view and requires that the field
BRAND is included in the view.
When entering values by brand and quarter both views K4H_PRODUCT and K4H_Month are used.
If a K4H view is missing, K4 will automatically display an error message when the user tries to save:
In addition to checking the K4H views existence, K4 also automatically checks that every primary key field which
is not aggregated has one or more values selected (or set in the context property).
This is done to avoid the risk of updating database values outside the current application context.
USERS’ MANUAL
Pag. 119 of 150
K4 Analytics | 2021.1 Aggregate data-entry
Let’s take an example where the SQL table contains budget data for the last 5 years but in the dashboard, we
have loaded only the last 3. When there is no selection on Year, the User will think he/she is working on the
last 3 years of data but K4 will update the entire table (5 years of data).
K4 detects automatically such cases and does not save the data, showing an error message with the details:
Dates
The data-entry of dates is not supported at aggregate levels.
USERS’ MANUAL
Pag. 120 of 150
K4 Analytics | 2021.1 Aggregate data-entry
Let’s take an example: the SQL table has PRODUCT as a primary key and we want to enter data at the BRAND level
but we want to protect data for records where the field STATUS is set to submitted.
This means that when we change the CONTRIBUTORINPUT value for a given brand, only products with a status
not equal to submitted will be changed.
This is simply accomplished by using the desired locking logic (with SQL syntax) in the measure Editable
property, followed by >>0 to indicate that data-entry is allowed at the aggregate level:
case when STATUS='submitted' then ‘-1’ else ‘0’ end>>0
If the cell contained a previous value, instead of allocating based on the allocation field, K4 will spread back the
data proportionally to the previous values.
The allocation works on a single aggregation (e.g. product > brand) or on a double aggregation (e.g. product >
brand and month > quarter).
Let’s say we want to enter data for the field CONTRIBUTORINPUT in the table BUDGET_MONTH_PROD by
BRAND and QUARTER and allocate down to PRODUCT and MONTH based on the field SALES from the
view V_SALES.
The allocation view V_SALES must include the fields PRODUCT, BRAND, MONTH and QUARTER:
USERS’ MANUAL
Pag. 121 of 150
K4 Analytics | 2021.1 Aggregate data-entry
E.g. If we want to configure the allocation for the field CONTRIBUTORINPUT in the table
BUDGET_MONTH_PROD to be based on the field SALES in the view V_SALES, the property SQL Allocation Driver
of the measure CONTRIBUTORINPUT must be set to V_SALES. SALES.
Important!
Only one table and one field can be currently configured to use SQL allocations in each K4 object.
USERS’ MANUAL
Pag. 122 of 150
K4 Analytics | 2021.1 SQL stored procedures
It is possible to execute SQL stored procedures (with parameters) from the K4 toolbar. This feature can be very
useful when we want the users to be able to execute complex operations on the data stored in the SQL
database. A typical example would be, in a budgeting application, creating a new version and copying into it the
data from an existing version.
When the User clicks the procedure description, the stored procedure is executed on the server and a
confirmation message is displayed in the K4 toolbar at the end of the execution.
It is also possible to configure stored procedures to be executed from the contextual menu by selecting a range
of cells and right clicking: K4 will automatically use the info of the selected cells to set the procedure parameters.
Important!
USERS’ MANUAL
Pag. 123 of 150
K4 Analytics | 2021.1 SQL stored procedures
Configuration
K4 object
o Title
o connection string file
o database schema
o procedure name
o comma-separated procedure parameters
o Auto-refresh
o Confirmation Request
o Return Parameter
E.g.
@copyfrom=revision1,@copyto=revision3,@year=2019
You can leverage the fact that K4 will replace automatically context’s fields (i.e. filters, parameters and marks),
to make it dynamic. Let us assume we want to allow the User copying the currently selected version to version
revision5 for the selected year.
@copyfrom=<VERSION>,@copyto=revision5,@year=<YEAR>
USERS’ MANUAL
Pag. 124 of 150
K4 Analytics | 2021.1 SQL stored procedures
It is possible to keep an empty line in the layout by setting a row with – as title in the procedures list:
SQL database
The SQL user used by K4 (the one set in the connection string file or the one linked to K4 IIS App Pool) must
be granted execution rights for the stored procedure. This is done, after creation of the procedure, by running
the SQL command:
E.g.
USERS’ MANUAL
Pag. 125 of 150
K4 Analytics | 2021.1 SQL stored procedures
▪ has the parameters @copyfrom, @copyto and @year (in addition to the mandatory @k4user)
and
1. inserts into the versions table the version @copyto if it does not yet exist.
2. Copies values in the BUDGET_MONTH_PROD table for the YEAR @year from version @copyfrom
to version @copyto.
AS
IF NOT EXISTS
BEGIN
END
using
as source
on target.MONTH = source.MONTH
then insert
(STATUS,MONTH,PRODUCT,YEAR,VERSION,CONTRIBUTORINPUT,REVIEWERINPUT,K4_CREATED,K4_USER) values ('input',
MONTH,PRODUCT,YEAR,@copyto,source.CONTRIBUTORINPUT,source.REVIEWERINPUT,@curtime,@k4user)
USERS’ MANUAL
Pag. 126 of 150
K4 Analytics | 2021.1 SQL stored procedures
when matched
USERS’ MANUAL
Pag. 127 of 150
K4 Analytics | 2021.1 Non-stored procedures (SQL statements execution)
How to configure it
In the K4 layout Stored Procedures section:
Important!
The SQL statement is executed as it is, without taking automatically into account the screen context (selections).
E.g. If the screen has a selection on YEAR and VERSION, the statement
Will clear the NOTES field for all years and versions.
In order to clear the NOTES field only for the selected year and version, we need to set the statement to:
K4 will automatically replace <YEAR> with the currently selected year and <VERSION> with the currently selected
version.
In order to be able to execute a SQL statement, it is mandatory to set the k4block parameter in the connection
string (please see Blocking non-stored procedures execution based on keywords).
USERS’ MANUAL
Pag. 128 of 150
K4 Analytics | 2021.1 Non-stored procedures (SQL statements execution)
K4 knows, for each template cell containing a K4GET functions, the keys.
If in a SQL statement we use [PRODUCT] and/or [MONTH], K4 will automatically make the statement
executable from the context menu and replace in the statement [PRODUCT] and/or [MONTH] with the
products and/or months of the selected cells.
USERS’ MANUAL
Pag. 129 of 150
K4 Analytics | 2021.1 Non-stored procedures (SQL statements execution)
To clear the NOTES field for the products related to the selected cells (for all the months), the SQL statement
will be:
To clear the NOTES field only for the products and the months related to the selected cells, the SQL statement
will be:
Will block the execution of SQL statements containing the keywords Drop and Delete.
USERS’ MANUAL
Pag. 130 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
How to use it
How to create new items
1. Click the New button. A pop-up form will appear:
Or
USERS’ MANUAL
Pag. 132 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
3. Click Update
4. Click the Save button top left.
How to configure it
SQL database
• The master table must contain the following audit trail fields:
o K4_USER nvarchar
o K4_CREATED smalldatetime
o K4_MODIFIED smalldatetime
• For each master table you want to edit, there must be a view called K4V_[master table]
You must include in the K4V view all the fields from the master table plus any additional field which can
be used to filter the master table records.
E.g. if we are managing product codes from the table PRODUCT and they are grouped by LINE and
BRAND, the view will we the following:
USERS’ MANUAL
Pag. 133 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
K4V_PRODUCT
Important!
The master table can have only one primary key (e.g. PRODUCT).
USERS’ MANUAL
Pag. 134 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
K4 object
USERS’ MANUAL
Pag. 135 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
USERS’ MANUAL
Pag. 136 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
USERS’ MANUAL
Pag. 137 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
USERS’ MANUAL
Pag. 138 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
Important!
If you want to manage a list of numeric values (e.g. 1 2 3 4), you must use | (pipe) instead of comma as list
separator. E.g. 1|2|3|4
Inline editing
USERS’ MANUAL
Pag. 139 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
Form editing
It is also possible to manage code and description of each value: the value is displayed in the dropdown and the
corresponding code is set in the field. This is achieved by typing in the comma-separated list of values code and
description, separated by | (pipe symbol).
Managing dropdown lists with values fetched from the SQL database
A dropdown can also be fetching data from a SQL view.
Syntax [table/view]:[field]
E.g. DIVISIONS:DIVISION
USERS’ MANUAL
Pag. 140 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
E.g. REPORTINGCODES:REPORTINGCODE,REPORTINGLINE
USERS’ MANUAL
Pag. 141 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
USERS’ MANUAL
Pag. 142 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
Notes
• The first row in the imported Excel must contain field names
• The first column must contain the primary key (e.g. EMPLOYEE)
• Field names are case-sensitive
• Columns with a header not matching any field are ignored
• The columns order is irrelevant
• Not all fields are required
• New records will be appended to the table and existing data will be updated
USERS’ MANUAL
Pag. 143 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables
By clicking the button Cache Update, it is possible to store the table records (for the filed configured in the
layout) in a cache file.
The cache file is located on the K4 server in a folder under C:\Program Files\K4\App_Data\connections\cache
with the same name as the connection string.
The table cache files can be used in the K4 Context when there are values to be chosen (single or multiple
select) from a list. Please see Getting parameter values from a cache table for more details.
Important!
Every time a change is made to the table, the cache file must be updated by clicking the Cache Update button.
USERS’ MANUAL
Pag. 144 of 150
K4 Analytics | 2021.1 Appendix 1 – Supported Excel functions
The following list contains all the Excel functions which can be used in K4 templates.
Functions A to C
Functions D to G
Functions H to L
USERS’ MANUAL
Pag. 145 of 150
K4 Analytics | 2021.1 Appendix 1 – Supported Excel functions
Functions M to Q
USERS’ MANUAL
Pag. 146 of 150
K4 Analytics | 2021.1 Appendix 1 – Supported Excel functions
Functions R to S
Functions T to Z
USERS’ MANUAL
Pag. 147 of 150
K4 Analytics | 2021.1 Appendix 2 - Known limitations
• does not work when there are no records in the database for the current selections. It only works
if there is at least 1 record in the database for the current selections.
8. Audit Trail + K4SAVE
if Audit Trail is activated for a measure set using K4SAVE i.e. in HR demo for FBONUS measure, the current
behaviour is that each time a user issues a Save
• A new record is written each time to the AUDIT_ table with NEWVALUE.
• OLLDVALUE is not populated.
• K4 Context: K4 Context from cache table puts %20 in place of space for saved values Therefore,
in the K4 context 'codes' should not contain spaces.
• Workaround, The K4 context from manually typed in values does not have this issue.
9. Smart Data Entry=>Copy From
• SQL Table names should not contain spaces otherwise Smart Data Entry will not work
10. Dynamic Rows Filtering:
• when working with certain templates e.g. HR demo template where there is more than 1 row in
Dynamic Rows block e.g. Budget and Forecast that both Filtering and Sorting
Ascending/Descending will not work.
11. Export to PDF
• The exported PDF file is created with Times New Roman font by default.
• Export to PDF is not possible when working within QlikView Desktop, however, works with
QlikView Access Point via client browser
12. Qlik Sense=>K4 Context Panel=>In some cases the below error is thrown when changing filters via the K4
Context Panel
USERS’ MANUAL
Pag. 148 of 150
K4 Analytics | 2021.1 Appendix 2 - Known limitations
Important!
For platform-specific known limitations please refer to the related K4 Platform Guide.
_______________________________
End Document
USERS’ MANUAL
Pag. 149 of 150
K4 Analytics | 2021.1 WANT TO LEARN MORE?
USERS’ MANUAL
VERSION
2021.1
CREATED ON
June 2021
K4 ANALYTICS LTD
Riverbank, Kells Business Park
Kells, Co. Meath, Ireland
www.k4analytics.com
USERS’ MANUAL
Pag. 150 of 150