0% found this document useful (0 votes)
36 views150 pages

K4 Analytics 2021 1 UsersManual

This document is a user's manual for K4 Analytics software version 2021.1. It provides an overview of the key capabilities of K4 including configuring SQL databases and Excel templates, adding and configuring the K4 object, features for dynamic rows and columns, SQL and host datasets, smart drill, views, printing and exporting, smart links, document galleries, undo/redo, smart data entry, smart paste, and data entry validation. The manual contains instructions and explanations to help users understand and utilize the various functions of the K4 software.

Uploaded by

Nadia Luna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views150 pages

K4 Analytics 2021 1 UsersManual

This document is a user's manual for K4 Analytics software version 2021.1. It provides an overview of the key capabilities of K4 including configuring SQL databases and Excel templates, adding and configuring the K4 object, features for dynamic rows and columns, SQL and host datasets, smart drill, views, printing and exporting, smart links, document galleries, undo/redo, smart data entry, smart paste, and data entry validation. The manual contains instructions and explanations to help users understand and utilize the various functions of the K4 software.

Uploaded by

Nadia Luna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 150

USERS’ MANUAL

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?

Overview .................................................................................................................................................................... 131


How to use it ............................................................................................................................................................. 131
How to configure it .................................................................................................................................................. 133
Editing multiple tables .............................................................................................................................................. 138
Managing dropdown lists ........................................................................................................................................ 139
Managing dropdown lists with values fetched from the SQL database.......................................................... 140
Importing data from Excel ....................................................................................................................................... 142
Managing tables cache ............................................................................................................................................. 144
Appendix 1 – Supported Excel functions ................................................................................................................. 145
Appendix 2 - Known limitations ................................................................................................................................. 148
WANT TO LEARN MORE? ......................................................................................................................................... 150

USERS’ MANUAL
Pag. 4 of 150
K4 Analytics | 2021.1 What can you do with K4?

What can you do with K4?


K4 allows you to leverage all the flexibility of spreadsheets inside host Business Intelligence platforms (MS
Power BI®, Looker®, Qlik Sense®, QlikView®, Tableau®) dashboards. Using an Excel© file as a template,
keeping all the formulas and the formatting, K4 dynamically fetches data from the host dashboard and from
SQL live queries to populate the Excel template.

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?

How does K4 work?


The K4 solution is made of two components: The host dashboard extension and the web service. The extension loads
data dynamically from one or several dashboard datasets or one or several SQL queries and merges them into an
Excel file used as a template.

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.

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.
• 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?

What are the development steps?


The best way to match the application specification is first of all to mockup the K4 layout using an Excel document.
The mockup will help to identify:
• Which cells receive host data
• Which data-entry cells will need buffer tables to store the saved data
• How the dashboard context impact the K4 grid: filtering the datasets and providing keys to drive cells
values.

Next steps are simple:


• Create the connection to connect to a database. You can use an existing database (MS SQL Server,
Oracle, MySQL, PostgreSQL, Snowflake, Azure) to host the buffer tables, with, as a best practice, a
dedicated schema. Otherwise create the database: create the security, then the buffer tables, views and
eventual triggers.
• Create the template, using MS Excel (usually leveraging the mockup).
• Publish the template to the server, using the template manager.
• Add the K4 object in the dashboard and set the properties in 3 steps:
1. Set the main properties
2. configure the SQL dataset(s)
3. configure the host dataset(s)

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).

Workflow process overview

USERS’ MANUAL
Pag. 9 of 150
K4 Analytics | 2021.1 Configuring the SQL database

Configuring the SQL database


Preparing the buffer tables in the SQL database
Create or open the Database
• Create a database (or restore from the K4 demos )
• Create the security (user, membership settings)
• Create the connection string to be stored at server level, in the \App_Data\connections folder.

Create the buffer table(s)


• Create the table(s)
• Create the primary keys:
o Taking into account the current context (filters, parameters, marks) affecting the data
o considering the cell location in the Excel template (e.g. month by column)
• Create the measure fields for data entry or display only (format compatible with the template cell format)

Create the view(s), mandatory


• Each buffer table requires a view, named with the ‘K4V_’ prefix + table name. Why? This will open
further possibilities, leveraging joins when useful. The K4 extension always queries the views.

The database used to store the entry data can be:

• MS SQL Server (Express, Standard or Enterprise editions – OLE DB driver)


• Oracle (requires the Oracle Provider for OLE DB)
• MySQL (requires the Connector/Net driver)
• Azure SQL Server
• Azure MySQL
USERS’ MANUAL
Pag. 10 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:

• Create a table (e.g. PNL_BUDGET) with:


o 5 primary keys corresponding to the four dimensions: YEAR, REPORTINGCODE, MONTH,
DIVISION and VERSION
o A numeric field (BUDGET) to store the input values
o The K4 Audit Trail fields, automatically updated by K4:

Field Name Field Type Description

K4_USER nvarchar User name. Stores the value of the K4 User


property.

K4_CREATED smalldatetime Date/time of record creation

K4_MODIFIED smalldatetime Date/time of record last change

• Create a view which:


o is named by concatenating the prefix “K4V_” (uppercase) and the table name (e.g. K4V_
PNL_BUDGET)
o contains all the fields from the table PNL_BUDGET, including the Audit Trail fields.

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!

• The table must have at least one primary key.


• Auto-incremental primary keys are not supported.
• When a text primary key may have variable-length (e.g. Division, Version, Status), it is recommended to
set it as NVARCHAR data type (instead of CHAR) in order to avoid trailing spaces. Trailing spaces could
create a ‘missed’ match of values.
• The audit trail fields K4_USER, K4_CREATED, K4_MODIFIED are mandatory.

K4 stores by default in the field K4_USER the value given

• QlikView/Qlik Sense Enterprise function OSUser() e.g DOMAIN\USERNAME


• Tableau dashboard filter/parameter (k4user) e.g DOMAIN\USERNAME
• Power BI function USERPRINCIPALNAME() e.g
• It is possible to implement a full audit trail using the optional K4 module Audit Trails.

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.

Automatic creation of tables and views with K4 Studio


You can use the optional module K4 Studio to import data from Excel files with automatic creation of the SQL
tables and the views (K4V_) required by K4 for editing and write-back. You can have multiple sheets, each one
containing a different dataset with the fields names in the top row.

For more details please see K4 Studio Users’ Manual.

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.

The syntax of the K4 connection string is:

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.

Provider=OraOLEDB.Oracle; Data Source=myServer; database=K4_GETTING_STARTED; User Id=k4;


Password=k4;OLEDB.NET=True

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.

The syntax of the K4 connection string is:

ODBC_SNOWFLAKE:DSN=[DSN name];Uid=[User];Pwd=[password];[Snowflake server];


db=[database];schema=[schema]

E.g.

ODBC_SNOWFLAKE:DSN=K4SNOWFLAKE_PNL;Uid=K4ANALYTICS;Pwd=xyz123;eq06548.eu-west-
1.snowflakecomputing.com;db=K4_PNL;schema=PUBLIC

Microsoft Azure SQL Server support


K4 provides support also for connecting to Microsoft Azure SQL databases using the SQL Server ODBC driver which
must be installed on the K4 server.

The syntax of the K4 connection string is:

ODBC_SQL:DSN=myDSN;Uid=myUser;Pwd=myPassword;

E.g.

ODBC_SQL:DSN=azureK4GETTINGSTARTED;Uid=k4admin;Pwd=goK$lls2020;

Microsoft SQL Server support


K4 Analytics can connect to SQL Server through OLE DB.

The syntax of the K4 connection string is:

Provider=SQLOLEDB.1;Persist Security Info=True;Data Source=servername;Initial Catalog=dbname;User


Id=user;Password=password;Connect Timeout=180

E.g.

Provider=SQLOLEDB.1;Persist Security Info=True;Data Source=localhost\SQLEXPRESS;Initial


Catalog=K4_GETTING_STARTED;User Id=k4;Password=k4;Connect Timeout=180

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.

The syntax of the K4 connection string is:

ODBC_REDSHIFT:Driver=Amazon Redshift
(x64);Server=myServer;Database=myDatabase;Uid=myUser;Pwd=myPassword;Port=5439;

E.g.

ODBC_REDSHIFT:Driver=Amazon Redshift (x64);Server=k4analytics-demo.c3xptwhbkddm.us-east-


1.redshift.amazonaws.com;Database=gettingstarted;Uid=k4;Pwd=k4;Port=5439;

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

Database Connections Manager

The Database Connections Manager can be used for:


• creating connection string files
• refreshing connections caches

It can be accessed in the K4 properties manager via the related toolbar icon:

or on the server from the Windows Start menu:

or by opening in the browser the address:

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

Creating connection string files

1. Type the file name (without spaces). E.g. test1


2. Select the database type: a sample connection string will appear in the box below
3. Edit the connection string (e.g. setting the servername, dbname, user and password)
4. Click Create

Refreshing connections caches


1. Select from the Connection drop-down list the connection string file
2. Type the Tables Schemaname
3. Type the Views Schema name.
4. Click Refresh Cache
5. Three files are created or updated under K4\App_Data\connections\cache
• K4_CachesList.js
• K4_ConnectionsList.js
• Connectionstring.cache e.g. K4_GETTING_STARTED.cache.js

Encrypting connection string files


To enhance security, it is possible to encrypt the connection string located under

\K4\App_Data\connections

by checking the Encrypt connection box in Database Connections Manager

SQL meta-data caching


Whenever K4 interacts with the back-end SQL database (getting data, writing back), it interrogates the database
meta-data to understand the table/views structure (primary keys, fields, hierarchies, etc.).
USERS’ MANUAL
Pag. 18 of 150
K4 Analytics | 2021.1 Configuring the SQL database

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

E.g. connection string file: K4_GETTING_STARTED.txt > cache file K4_GETTING_STARTED.cache.js

The caching can be activated in the web.config file located in

\K4

with the line:

<add key="sqlcache" value="on" />

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

Workflow – making changes in the SQL database


Everytime you want to make changes to the SQL database, you have to:

• Disable K4 SQL meta-data caching (if active).


• Make the changes in the SQL database.
• Refresh the connection cache in the Database Connections Manager.
• Re-enable K4 SQL meta-data caching (optional).

Database Connections: K4 log and SQL cache by connection


It is possible to activate/deactivate both the K4 log and the SQL cache separately for each database connection
by using the parameters K4_log and K4_cache at the end of the connection string. Accepted values are true and
false.

Important!

• The parameters name is case-sensitive


• Both parameters must be always specified, first K4_log and then K4_cache.

E.g.

Provider=SQLOLEDB.1;Persist Security Info=True;Data Source=localhost\SQL;Initial Catalog=MyDB;User


Id=k4;Password=k4;K4_log=true;K4_cache=false;

USERS’ MANUAL
Pag. 20 of 150
K4 Analytics | 2021.1 Configuring the SQL database

Implementing user-level security


Since the current user is automatically added to the context as K4_CURRENTUSER, K4 will automatically use it
to filter SQL data if the field K4_CURRENTUSER is part of the K4V view.

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

Managing Excel templates


Overview
In the Excel template, each cell can directly fetch data from the dataset(s) using the K4GET function.

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.

Static Template Example as shown in our GETTING


STARTED demo

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.

For more details please see Dynamic rows generation .

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

Excel features support


Conditional formatting

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

The K4GET function

This custom function fetches data from the host and SQL datasets and accepts the following parameters:

position parameter Description Example

1 Dataset name Name of the dataset as set in the INVOICES


host / SQL datasets.

2 Measure Name of the measure as set in the RETURNS


host / SQL datasets.

3 Keys Couples of key name:key value Model:MOD1;MONTH:01


separated by ; (semicolon). The order
of the keys must match the order set
in the Dimensions property in the
datasets (host/SQL).

4 Editable Optional: allows setting the cell to -1


editable (0) or read-only (-1). It can be
an Excel formula but should not point
to a cell with a K4GET.

USERS’ MANUAL
Pag. 26 of 150
K4 Analytics | 2021.1 Managing Excel templates

If we have a dataset called INVOICES with the following content:

MODEL MONTH INVOICES RETURNS STOCK

MOD1 01 345 12 46

MOD2 02 220 3 98

MOD3 01 75 0 15

The cell formula:

=K4GET("INVOICES","RETURNS","MODEL:MOD2;MONTH:02")

will return the value 3.

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

The K4SAVE function


It is possible to use the K4SAVE function to save back to the SQL database the result of a calculation made by
the Excel formula in a cell. The syntax is:

=K4SAVE([table name],[field name],[keys],[formula])

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.

=K4SAVE("SALARIES","BONUS","EMPLOYEE:" &$A4,"=vBonus*Q" & ROW())

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

The K4SUM function – dynamic totals

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))

This custom function accepts the following parameter:

position parameter Description Example

1 Row number of the The cell row must be indicated with ROW(F5)
cell to be summed the Excel function ROW().

The K4SUMLOCK function – totals locking


In K4 Analytics 2020.2 in order to make K4SUMLOCK work, there must be in the template K4SUMs pointing
to the cells summarized by the SUM cell we want to lock:

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

The locking/unlocking is performed by:

• Selecting the cell(s)

• Clicking the related icon in the K4 toolbar

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.

• The SUM must use a range syntax. E.g. =SUM(F8:Q8)


• The K4SUMLOCK function takes two arguments: row number and column number of the cell
containing the SUM. When placed inside the dynamic block of the template, you must use the
ROW() and COLUMN() functions to make it dynamic inside the block.
• The column(s) containing the K4SUMLOCK function can be hidden in the template.

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 K4VALUE function


This custom function can be used for placing in a template cell:

• the value of a parameter coming from the current selection / K4 context / the property

syntax =K4VALUE(parameter name)

example =K4VALUE(“Month”)

returned value 03

notes when the Month 03 is selected

• a value from a dataset (SQL or Host)

syntax = K4VALUE([table name],[field name],[keys])

example =K4VALUE(“INVOICES”,” RETURNS”,” Model:MOD2;MONTH:02”)

returned value 3

notes If we have a dataset called INVOICES with the following content:

MODEL MONTH INVOICES RETURNS STOCK

MOD1 01 345 12 46

MOD2 02 220 3 98

MOD3 01 75 0 15

• the n-th value of a list

syntax =K4VALUE(list, index)

example =K4VALUE("K4_SalesBudgeting_Input-B,K4_SalesBudgeting_Input-OA,K4_SalesBudgeting_Input-
WF,K4_SalesBudgeting_Input-RF",2)

returned value K4_SalesBudgeting_Input-OA

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

syntax =K4VALUE(parameter name, index)

USERS’ MANUAL
Pag. 31 of 150
K4 Analytics | 2021.1 Managing Excel templates

example =K4VALUE("Month",2)

returned value 04

notes when Months 03, 04 and 05 are selected.

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

syntax =K4VALUE(parameter name, list 1, list 2)

example =K4VALUE("Layout","Budget vs Actual,Over-


Assignment,WorkFlow,Reforecast","K4_SalesBudgeting_Input-B,K4_SalesBudgeting_Input-
OA,K4_SalesBudgeting_Input-WF,K4_SalesBudgeting_Input-RF")

returned value K4_SalesBudgeting_Input-OA

notes when the Layout WorkFlow is selected

• the n-th value of a list where n is the position of a value in a second list

syntax =K4VALUE(index, list 1, list 2)

example =K4VALUE(3,"K4_SalesBudgeting_Input-B,K4_SalesBudgeting_Input-
OA,K4_SalesBudgeting_Input-WF,K4_SalesBudgeting_Input-RF")

returned value K4_SalesBudgeting_Input-RF

notes The index may be a number or refer to a cell

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


The K4 grid is based on Excel template files. There is a simple process using Excel to create a template and
publish it in the end-user application. In order to be used in K4 as a template the Excel file (.xlsx) must be
uploaded to the server through the K4 Template Manager:

The Template Manager can be accessed in the K4 properties manager via the related toolbar icon:

or on the server from the Windows Start menu

or by opening in the browser the address:

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

Adding and configuring the K4 object


The K4 object is available in different formats depending on each one of the supported platforms:

• A custom visual for Google Looker


• A custom visual for Microsoft Power BI
• A Teams App for Microsoft Teams
• An extension object for QlikView
• A visualization extension for Qlik Sense
• A dashboard extension for Tableau

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

Setting the K4 object properties

K4 Mode You can choose between two different modes:

• 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.

Syntax [variable1 name]:[variable1 value]; [variable2 name]:[variable2 value];

E.g. currentYear:2019;LastReview:201812

2019 will be copied in the Excel template cell named currentYear and 201812 in
the cell named LastReview.

Aliases This property allows translating filters and parameters names.


E.g. YEAR(Order Date):Year,Churn Rate:ChurnRate
This property allows dynamically hiding Excel template’s rows based on the cell
Hide rows based values of the first column. For more details please see Displaying / hiding
on first column template’s rows/columns based on Excel formulas.
Hide columns This property allows dynamically hiding Excel template’s columns based on the
based on first cell values of the first row. For more details please see Displaying / hiding
row template’s rows/columns based on Excel formulas
Options
Load Message It is possible to display a message in a modal window until the refresh of the K4
object is completed. This can be useful when the loading may take some time
and we want to prevent the user from interacting with the document (e.g.
changing the selection).

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.

Refresh on Save Makes K4 automatically refresh after each save.


Auto Save Allows saving automatically every x seconds.
Show Condition Not yet implemented
Grid Setting the K4 grid in disconnected mode at load avoids querying data and
disconnected at populating the grid at the first load. The User can therefore be free to make
load changes to the app selections and then, when ready, click the orange row to
reconnect the grid.Performance optimization tip for the end-user experience!

Message to be displayed when the grid is disconnected at load. Default message


Disconnect grid is: Grid disconnected – click here to reconnect.
message
Treat nulls as By default, a null value from the SQL database is loaded as zero in the K4 grid
cell. It is possible to distinguish, for numeric fields, between zero and null in the
K4 cells.

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:

The zoom value changed interactively is not saved.

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).

Datasets With this property it is possible to configure K4 to automatically send datasets


data (both host and SQL) to separate sheets in the template. Enter here the
comma-separated list of datasets. Datasets names are case-sensitive. For more
details please see Leveraging the VLOOKUP function with datasets.

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.

E.g. 2,3,4,5,6,7,8 will hide columns C,D,E,F,G,H,I.


USERS’ MANUAL
Pag. 39 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object

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.

Save all values To be documented.

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

Multiple values must be separated by a comma.

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.

A common practice is to build the custom help in Microsoft Word, create


in the Word document bookmarks and then save to HTML the document
to the docs folder on the server in the K4 Analytics folder (e.g. C:\Program
Files\K4\docs).

How to insert a bookmark in a MS Word document

In the current document, do the following:

a. Select the text or item to which you want to assign a bookmark,


or click where you want to insert a bookmark.
b. On the Insert tab, in the Links group, click Bookmark.
c. Under Bookmark name, type a name.

Bookmark names must begin with a letter and can


contain numbers. You can’t include spaces in a
bookmark name. However, you can use the underscore
character to separate words — for example, First
heading.

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]

E.g refresh:Refresh the K4 grid will produce:

FILTERING/SYNCRONIZATIO
N To be documentedAll properties not documented.

DEVELOPMENT OPTIONS

Designer Activates Designer Mode. For more details please see K4 Designer Mode.

Saving the K4 object properties (QlikView, Qlik Sense, Tableau,


PowerBI)
Please see the specific K4 Platform Guide for details on how to save the K4 object properties.

USERS’ MANUAL
Pag. 42 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object

Dynamic rows generation


We can set a group of template’s rows to be automatically cloned for each value of a given dimension (e.g.
MODEL). The current version supports up to nine dynamic dimensions which are set in the Dynamic Row Fields
property.

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.

=K4GET("INVOICES","RETURNS","MODEL:" & $A5 & ";MONTH:" & F$2)

It is possible to manage up to nine dynamic row fields.

The syntax is:

[SQL view/table name]:[comma-separated SQL fields]

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. including brand and line when managing products.

Single dynamic row field

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.

Two dynamic row fields

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.

From three to nine dynamic row fields


To manage more than 2 row fields (up to 9) simply add additional columns in the template with k4dim2 (or
k4dim3, k4dim4, etc.) in the first row and add the fields in the property.

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.

Repeated dynamic row fields values display


It is possible to display repeated values even when the Developer Mode is off, by setting to off the property Hide
Dimensions Repeated Values. By default, Repeated Values are displayed with grey background. This cannot be
overwritten

USERS’ MANUAL
Pag. 45 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object

Dynamic Rows from datasets / context


It is now possible to fetch the values of the dynamic rows:

• 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])

Dynamic Rows wizard


When setting the property Dynamic Row Fields, it is possible to use a wizard by double-clicking the cell:

Dynamic columns generation

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.

As a dynamic column field you can use:

• A field from the context


• A dimension from a SQL dataset
• A dimension from a host dataset

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

Columns filtering in templates with dynamic rows.

It is possible, when the template is dynamic, to activate interactive columns filtering:

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

For columns containing numbers, it is possible to use number filters:

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!

• Filtering is temporary and is cleared at next K4 object refresh.


• It is currently not possible to activate the filtering to apply to dimension columns only.

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:

=K4GET("PNL_BUDGET ","BUDGET","REPORTINGCODE:" & $I5)

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:

[filter1 name]:[ filter1 value]; [filter2 name]:[ filter2 value]

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).

For example, city > state.

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

Managing cascade lists from SQL

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

It is also possible to manage codes and descriptions in drop-downs: descriptions


are shown in the list while are saved in the database. Codes and descriptions
must be separated with | (pipe) in the values list.

E.g. app|Approved,rej|Rejected,hld|On hold

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.

The field can contain the following values:

• 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:

c in the center of the c|PROD03056.jpg

cell

s fills the cell s|PROD03056.jpg

z zoomed in the cell z|PROD03056.jpg

with its original aspect


ratio

By default, the image displays in the upper left corner of the cell with its original size.
Images are not exported to Excel.

Smart Data-Entry For more details please see Smart Data-Entry.


Copy from For more details please see Smart Data-Entry.
Allocate by For more details please see Smart Data-Entry.
Label For more details please see Smart Data-Entry.
Default Value

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

[dataset name]![field name]

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

SQL Measures data-types

Include list of Measure Types and descriptions 2DO

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

SQL Measure pop-up

USERS’ MANUAL
Pag. 60 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object

SQL datasets wizard


When configuring the SQL datasets, a wizard is available to quickly setup dimensions and measures.

1. Select the table


2. Double-click the Dimensions cell to open the wizard
3. In the wizard you can set the dimensions, by selecting them from a list, and the measures. For each
measure you can set the data type and if it’s editable.
4. Click Confirm

Continue setting as usual each measure individually for other options.

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:

A second click on the icon closes the window.

Template automatic congruity check


When working in Designer Mode, K4 automatically detects and highlights inconsistencies due to wrong
parameters in the K4GET function. Cells with inconsistencies are highlighted with the text !!! on an orange
background. The cell tooltip describes the type of error and its details.

Detected inconsistencies include:

• Non-existing or empty dataset


• Dataset case mismatch
• Non-existing field
• Field case mismatch
• Non-existing key
• Key case mismatch
• Keys wrong order

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.

These parameters become integral part of K4 context and therefore:

• They are used to filter SQL queries


• They can be accessed in the K4 template using the K4VALUE function
• They are dynamically replaced in the layout where the parameter name is included between < and >

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).

A layout section is dedicated to configure the K4 context.

How to configure it

USERS’ MANUAL
Pag. 65 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object

Context Panel at load


This property determines if the K4 context panel on the left is visible or hidden when the K4 object is initially
loaded.

The user can click the context icon to show/hide the panel:

Panel width (px)


Width in pixels of the K4 context 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

Single Select Single value selection.

Multi Select Multiple values selections.

Number Input box accepting only


numeric values.

Text Input text box.

Switch Switch setting the parameter to


true or false.

Slider Numeric input with a slider


configurable with thresholds
and step.

USERS’ MANUAL
Pag. 67 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object

Date Date input with calendar.

Values
For parameters of type Single and Multiple Select set here the list of comma-separated valid values.

e.g. budget,revision1,revision2

It also possible to manage a label for each option:

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

It is also possible to set the input step with a third parameter.

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.

For parameters of type Switch type either true or false.

Connection String File


Please see Getting parameter values from a cache table

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

Getting parameter values from a cache table


It is possible to get the list of values (for Single / Multi Select parameters) from the cache of a SQL table (created
with K4 in Master Table Editor mode – please see Managing tables cache).

1. Leave the columns Values and Default empty.


2. Enter:
a. Name of the connection string file (e.g. K4_PnL)
b. Name of the table (e.g. VERSION)
c. Name of the field to fetch the parameter values from (e.g. VERSION)
d. Optionally – name of the field to fetch the parameter values from (e.g. VERSION_DESC)

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

Avoiding the automatic refresh at parameter change.

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.

1. Click the disconnect icon:

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.

These parameters become integral part of K4 context and therefore:

• They are used to filter SQL queries


• They can be accessed in the K4 template using the K4VALUE function
• They are dynamically replaced in the layout where the parameter name is included between < and >

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.

A layout section is dedicated to configure the K4 toolbar Dynamic Menu.

USERS’ MANUAL
Pag. 72 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object

How to configure it

For each option of each menu item:

• 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).

Setting all menu item options with one row

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

Updating multiple variables with one option

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:

Leveraging parameters replacement for an even more dynamic menu

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

Setting the dynamic menu through a single string


In alternative to the layout configuration, it is possible to configure (as in releases prior to 2020.1) the dynamic
menu with one string in the TOOLBAR section:

This for previous releases compatibility and to manage special cases where the string comes from the host
platform.

The syntax for this property is:

[variable name]:[Group label]=[option1 value]:[option1 label]

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

Will produce the following menu:

Multiple parameters per menu item

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 -.

Example 1 – setting parameters vkLevel and vkSheet

vkLevel-vkSheet:INPUT LEVEL=CATEGORY-1:Category,ACCOUNT_GROUP-2:Account Group,ACCOUNT-3:Account

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

Example 2 – setting parameters vkLevel, vkSheet and vkRows

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

Category CATEGORY 1 CATEGORY!CATEGORY


Account ACCOUNT_GRO 2 ACCOUNT_GROUP!CATEGORY/ACCOUNT_GROUP
Group UP
Account ACCOUNT 3 K4H_ACCOUNT!CATEGORY/ACCOUNT_GROUP/ACCOUNT

Important!

In values:

: (colon) must be replaced with !

, (comma) must be replaced with / (slash)

USERS’ MANUAL
Pag. 76 of 150
K4 Analytics | 2021.1 Adding and configuring the K4 object

Layout parameters dynamic replacement


K4 automatically replaces everywhere in the layout parameter names from the context where included between
< and > with their value.

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!

Parameter names are case-sensitive.

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

E.g. DATE: <today()> becomes DATE:2020-08-23

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:

▪ copy the selected cell(s)


▪ paste to the selected cell(s)
▪ when Smart Data-Entry is configured:
o open the Smart Data-Entry panel to manipulate the selected cells
o lock the selected cell(s)
o unlock the selected cell(s)

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.

▪ display the cell’s audit trails

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

Displaying / hiding template’s rows/columns based on Excel formulas


It is possible to dynamically hide Excel template’s rows and/or columns based on the cell values of the first row
/ column. If the cell in the first row / column contains the value hide (either plain text or the result of an Excel
formula), then the column / row is automatically hidden. The first row / column containing the flag are
automatically hidden.

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.

Displaying / hiding template’s rows/columns at every recalculation.


When hiding rows / columns based on Excel formulas, it is also possible to set the hiding to be executed at
every sheet recalculation (e.g. after a cell change). This feature allows hiding rows and columns dynamically
depending on the user’s input.

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

Leveraging the VLOOKUP function with datasets.


It is possible to configure K4 to automatically send the datasets data (both host and SQL) to separate sheets in
the template. This way the datasets data can be referenced in the template using Excel VLOOKUP function. If
the cell referenced in the VLOOKUP function is a data-entry one, the value is automatically updated whenever
the value in the referenced cell is changed.

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

An example- recommended actions in P&L

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.

First, we add the Actions dataset in the SQL Datasets:

USERS’ MANUAL
Pag. 84 of 150
K4 Analytics | 2021.1

In the Excel template:

• We create an empty sheet called dataset_Actions

• We use the VLOOKUP function setting it on the concatenation of:


o The DIVISION coming from the named cell
o The REPORTINGCODE coming from the hidden column F
o The STATUS coming from the S column

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:

• In MS Power BI (it uses the same K4 models library)


2. In the master K4 object, set the saved drill layout name:

It is possible to set multiple smart drill and for each one configure:

Model ID Select the model id.

Menu Label Label to be displayed in the cell(s) context menu.

Context [optional] This option allows adding parameters to the drill context.

E.g. STATUS:completed.

Multiple values must be comma-separated and different parameters


must be separated with ; (semi-colon).

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

Active on to activate, off to deactivate.

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 power of Smart Drill


In order to appreciate all the value of the Smart Drill feature, it is important to notice that the drill layout is
completely independent from the master layout, including the SQL database settings. This means that each drill
layout could potentially point to a different database.

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):

Selecting non contiguous cells


If you select multiple cells (keeping the Ctrl key pressed) and then right-click to drill, K4 will consider the
coordinates of all selected cells. In the screenshot below example, accounts belonging to categories 1,4 and 6
will be selected:

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.

A view is set in the layout as a combination of:

• 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

Print & export to PDF

It is possibile to print the K4 grid and to export it to a PDF file.

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:

As usual it is possible to leverage context parameters replacement.

Setting for example the File Name to


K4_<DIVISION>_<YEAR>_<MONTH>

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:

• At the place of the K4 grid


• In a new browser window
• Inside a pop-up window opened with K4 context menu by right-clicking a cell in the K4 grid

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

How to configure Smart Links

setting description

Link URL of the link to be opened.

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

title Title to be displayed in the pop-up window tab.

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.

New window: the link will be opened in a new browser window.

Tooltip: the link will be opened inside a pop-up window opened


with K4 context menu by right-clicking a cell in the K4 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).

filters Not active

Links (URLs) parameters


If, in the URL, you set context field names (dashboard filters, parameters and marks or cell’s keys) between < >,
K4 will automatically replace them with the value.

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.

The card contains:

• a thumbnail image
• title, subtitle and full description
• List of tags (categories)

To open the gallery simply click the gallery icon on K4 toolbar:

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.

E.g. HR/HR_Manual_ENG.pdf will open the file


HR_Manual_ENG.pdf located in C:\Program
Files\K4\App_Data\documents\HR

The document could also be a link to a Youtube video. In this case


the thumbnail is automatically set to the Youtube logo.

Thumbnail Thumbnail image to be displayed in the card. If no thumbnail is set,


K4 will automatically use the png file with the document
extension, located in C:\Program Files\K4\App_Data\documents.

USERS’ MANUAL
Pag. 99 of 150
K4 Analytics | 2021.1 Undo / Redo

(E.g. PDF.png for pdf documents). If the document is a Youtube


video, the thumbnail is automatically set to the Youtube logo.

Title To displayed in the document card

Subtitle To displayed in the document card

Description To displayed in the document card

Tags Comma-separated list of tags. Tags can then be used to filter


documents in the gallery. Enter at list one tag.

How to customize the Gallery logo

The gallery displays a K4 logo top left:

The logo file name is K4Gallery_logo.png, located in C:\Program Files\K4\App_Data\documents.

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

Two new buttons will appear in the toolbar:

Undo one or more actions


To undo one or more actions at the same time, click the arrow next to Undo button image, click in the
chronological list of changes the action you want to undo up to. It will undo the selected action and all the
actions done before (top of list).

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

Redo one or more actions


To redo one or more actions at the same time, click the arrow next to Redo button image, click in the
chronological list of changes the action you want to redo up to.

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!

The actions history is cleared every time data is refreshed.

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.

Optionally you can also set:

A. Fields which can be copied from


B. Fields which can be used as a driver to allocate a total value to single cells.

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).

The syntax to be used in the Copy from property is:

[dataset name]![field to copy from]

It is possible to indicate multiple fields comma-separated.

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 and field names are case-sensitive.

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).

The syntax to be used in the Allocate by property is:

[table name]![field to allocate to]:[table name]![driver field]

It is possible to indicate multiple fields comma-separated.

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

Working with text and list fields


Smart Data-Entry will automatically detect text and list fields: from the Smart Data Entry panel it would be
possible to type a text to be assigned to all cells in the selected range or (for list fields) to select a value from a
drop-down list.

USERS’ MANUAL
Pag. 108 of 150
K4 Analytics | 2021.1 Smart Data-Entry

Smart Copy with relative references


Smart Data-Entry allows setting a field to be copy-able from one or more other fields.

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.

It can also be configured in the measure pop-up form:

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

R1 The cell in the row below, same column

R2 The cell in 2 rows below, same column

R-1 The cell in the row above, same column

R1C1 The cell in the row below, one column to the


right

C-1 The cell in the previous column (left), same row

It is possible to manage multiple copy from, simply by separating them with a comma.

E.g.

R1:Split by Working Days,R2:Split evenly

Smart Copy: an example


In this example we want to provide the end user with the simplest way of splitting a yearly budget over the 12
months based on different criteria (proportionally to the number of working days in each month or evenly by
dividing by 12).

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.

E.g. =IFERROR($D6/$Q$4*E$4,0) to split based on number of working days in row 4

=IFERROR($D6/12,0) to split evenly

USERS’ MANUAL
Pag. 110 of 150
K4 Analytics | 2021.1 Smart Data-Entry

2. In the measure properties, set Copy from to


R1:Split by Working Days,R2:Split evenly

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.

A new button will appear in the toolbar:

How to use it
A click on the Smart Paste button will display the following screen:

1. click the Browse button and select the Excel file


2. click the Import Excel File button
3. click the Smart Paste button to paste into the K4 editable cells the values from the Excel file. If you
want to add the pasted values to the existing ones, click the Smart Paste + button instead.

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.

In the first top left cell (A1) we set the formula:

=IF(SUM(C7:N7) <> 12,"!WARNING! The yearly total must be 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","")))

will allow saving only if:

• The total of cells C7:N7 is equal to 12


• No cell in C7:N7 is negative
• No cell in C7:N7 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.

Level physical 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:

• querying the K4V view • querying the K4V view


• adding automatically matching fields • adding automatically matching fields
from the current selection and the from the current selection and the
context to the WHERE condition. context to the WHERE condition.
• Using by default the SUM function (or
the optional function indicated field by
field in the Query property).
• Automatically creating the GROUP BY
section.
Write-back Pre-existing records are updated and eventual When a cell value is changed and saved, K4
new records are automatically created in the performs:
table.
• If the cell contained a previous value, a
spread-back by changing proportionally
related previous values in the table.
Audit trail fields (K4_USER, K4_CREATED, • If the cell was empty, a break-back by
K4_MODIFIED), if present, are updated.* splitting evenly the entered value using
hierarchies (e.g. Month > Quarter) and
the counting of eventual primary key
fields with multiple values (e.g.
Year:2017,2018). Eventual new records
are automatically created in the table.

USERS’ MANUAL
Pag. 115 of 150
K4 Analytics | 2021.1 Aggregate data-entry

Audit trail fields (K4_USER, K4_CREATED,


K4_MODIFIED), if present, are updated.*

USERS’ MANUAL
Pag. 116 of 150
K4 Analytics | 2021.1 Aggregate data-entry

SQL database requirements


Let’s use some SQL tables from K4 official demos to illustrate how to configure the database for aggregated
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

We therefore need to create also K4H_PRODUCT, K4H_VERSION and K4H_YEAR.

When entering values by brand:

• 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:

Text & check-boxes


The data-entry of text and check-boxes is also supported at aggregate levels.

The cells will be displayed as empty (unchecked for the check-boxes).

Dates
The data-entry of dates is not supported at aggregate levels.

Managing locked data


When entering data at an aggregate level, K4 will automatically consider the eventual locking logic set at the
physical level.

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

SQL-based allocation (MS SQL Server)


When entering data at an aggregate level in a table (the input table), it is possible to use an SQL field from an
SQL view as an allocation driver. For example, when entering budget by brand, we can use sales as a weight (or
driver) to allocate the budget to each product.

This feature is currently supported for Microsoft SQL Server only.

How does it work


When K4 detects it is working at an aggregate level and a new value is entered in an empty cell, it will
automatically join the K4V_ view with the allocation view and use the allocation field to split (or allocate) the
entered value (e.g. by brand) to the physical level (e.g. by product).

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).

How to configure the SQL database


In addition to the requirements for aggregate data-entry, the allocation view must include, for every primary
key field of the input table being aggregated, the field itself and the aggregating field.

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

How to configure the K4 object


The allocation is configured in K4 through the SQL measure SQL Allocation Driver property.

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

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.

Through the Stored Procedures settings:

▪ one or more stored procedures can be set


▪ for each procedure its title will appear in the new procedures’ menu in the K4 toolbar

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!

This feature has been so far tested for MS SQL Server.

USERS’ MANUAL
Pag. 123 of 150
K4 Analytics | 2021.1 SQL stored procedures

Configuration

K4 object

For each procedure you need to set:

o Title
o connection string file
o database schema
o procedure name
o comma-separated procedure parameters

The following are optional:

o Auto-refresh
o Confirmation Request
o Return Parameter

Each procedure parameter must be preceded by @ and followed by =.

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.

The title will be:


copy Budget from version <VERSION> to revision5

and the parameters:

@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 stored procedures must:

▪ have a name starting with K4 (e.g. K4copyversion).


▪ have the parameter @k4user. This parameter is automatically used by K4 and should not be listed
in the K4 property.
▪ have at least one parameter (in addition to k4user)

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:

GRANT EXEC ON [stored procedure] TO [user].

E.g.

GRANT EXEC ON dbo.K4copyversion TO k4;

USERS’ MANUAL
Pag. 125 of 150
K4 Analytics | 2021.1 SQL stored procedures

Example: copying budget data from one version to another

The SQL Server stored procedure in the box below:

▪ 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.

CREATE PROCEDURE [dbo].[K4copyversion] @copyfrom nvarchar(100) , @copyto nvarchar(100), @year nvarchar(4),


@k4user nvarchar(100)

AS

DECLARE @curtime smalldatetime = GETDATE()

IF NOT EXISTS

(SELECT * FROM VERSIONS WHERE VERSION=@copyto)

BEGIN

insert into VERSIONS (VERSION) VALUES (@copyto)

END

merge into BUDGET_MONTH_PROD as target

using

(SELECT MONTH,PRODUCT,YEAR,@copyto as VERSION,CONTRIBUTORINPUT,REVIEWERINPUT from BUDGET_MONTH_PROD where


YEAR=@year and VERSION = @copyfrom)

as source

on target.MONTH = source.MONTH

AND target.PRODUCT = source.PRODUCT

AND target.YEAR = source.YEAR

AND target.VERSION = source.VERSION

when not matched by target

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

then update set K4_MODIFIED=@curtime, K4_USER= @k4user, status='input', CONTRIBUTORINPUT =


source.CONTRIBUTORINPUT, REVIEWERINPUT = source.REVIEWERINPUT, K4_CREATED= NULL,NOTES= NULL,REVIEWNOTES= NULL;

USERS’ MANUAL
Pag. 127 of 150
K4 Analytics | 2021.1 Non-stored procedures (SQL statements execution)

Non-stored procedures (SQL statements execution)


In addition to executing SQL stored procedures, it is possible to let the end user execute SQL statements. This
can be especially useful when working with SQL databases not supporting stored procedures (e.g. Snowflake).

How to configure it
In the K4 layout Stored Procedures section:

• Type the title


• Type the Connection String
• Leave Schema empty
• Leave Stored Procedure empty
• Type the SQL statement in the Parameters column, using when needed the schema in front of each
table name.

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

UPDATE BUDGET_MONTH_PROD SET NOTES=NULL

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:

UPDATE BUDGET_MONTH_PROD SET NOTES=NULL WHERE YEAR=<YEAR> AND VERSION='<VERSION>'

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)

Executing a SQL statement on selected cells


It is possible to execute a SQL statement from the context menu using automatically the keys of the selected
cells.

K4 knows, for each template cell containing a K4GET functions, the keys.

E.g. PRODUCT and MONTH when using:

=K4GET("BUDGET_MONTH_PROD","CONTRIBUTORINPUT", "PRODUCT:" & $B9 & ";MONTH:" & F$2)

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:

UPDATE BUDGET_MONTH_PROD SET NOTES=NULL WHERE YEAR=<YEAR> AND VERSION='<VERSION>'


AND PRODUCT IN([PRODUCT])

To clear the NOTES field only for the products and the months related to the selected cells, the SQL statement
will be:

UPDATE BUDGET_MONTH_PROD SET NOTES=NULL WHERE YEAR=<YEAR> AND VERSION='<VERSION>'


AND PRODUCT IN([PRODUCT]) AND MONTH IN([MONTH])

Blocking non-stored procedures execution based on keywords


In order to automatically block the execution of dangerous SQL statements (e.g. dropping of tables / views,
deleting of records), it is possible to set in the connection string file a list of forbidden keywords using the
k4block parameter: any SQL statement configured in the K4 object and containing a forbidden keyword will not
be executed.

E.g. the following connection string file:

Provider=SQLOLEDB.1;Persist Security Info=True;Data Source=localhost\SQL;Initial Catalog=debug;User


Id=k4;Password=k4;K4block=Drop,Delete;

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

Using K4 to edit master tables


Overview
K4 can be effectively used to manage 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.). The goal is to allow the
user to:

• Create new items


• Delete items
• Update item attributes.

How to use it
How to create new items
1. Click the New button. A pop-up form will appear:

2. Click the Create button.


USERS’ MANUAL
Pag. 131 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables

How to delete an item


1. Click the first column to select the record to be deleted
2. Click the Delete button top left. A confirmation request will appear:

How to update item attributes


1. Simply double click a cell to edit it in the grid (in-place editing).

2. Click the Save button top left.

Or

1. Click the first column to select the record to be edited


2. Click the Edit button top left

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

1. Set the K4 Mode to Master Table

2. Configure the table(s) in the SQL Datasets


• The Dimension must be the primary key (e.g. EMPLOYEE)

USERS’ MANUAL
Pag. 135 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables

Setting the page size


It is possible to allow the user change the length of the editor page (number of records) with the Page Length
property: type the comma-separated list of page sizes with at the end the label to be used to indicated all
records (no paging).

E.g. 5,10,25,All records

USERS’ MANUAL
Pag. 136 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables

Managing multiline text


When a field is set to data type long text the text-box in the editing form is multi-line.

USERS’ MANUAL
Pag. 137 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables

Editing multiple tables


It is possible to configure up to 10 different master tables in the SQL datasets section:

Tabs on the top allow switching between the configured tables:

USERS’ MANUAL
Pag. 138 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables

Managing dropdown lists


It is possible to configure a text field to be set by choosing a value from a dropdown list.

1. Set the data type to list


2. Type the comma-separated list of possible values in the List property

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).

E.g. A|Division A,B|Division B

Managing dropdown lists with values fetched from the SQL database
A dropdown can also be fetching data from a SQL view.

1. Set the data type to list


2. Type in the List property the name of the view (or table) and the field separated by :

Syntax [table/view]:[field]

E.g. DIVISIONS:DIVISION

USERS’ MANUAL
Pag. 140 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables

To manage code and description type in the List property:

Syntax [table/view]:[code field],[description field]

E.g. REPORTINGCODES:REPORTINGCODE,REPORTINGLINE

USERS’ MANUAL
Pag. 141 of 150
K4 Analytics | 2021.1 Using K4 to edit master tables

Importing data from Excel


Using K4 in Master Table Editor mode, it is now possible to import records from an Excel file.

1. Click the Import button, a new browser window will be opened.

2. Click the Browse button and select the Excel file.

3. Click the Save button.


4. Close the browser window.
5. Click the Refresh button to see the updated table.

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

Managing tables cache

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.

E.g. C:\Program Files\K4\App_Data\connections\cache\K4_PnL

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

Appendix 1 – Supported Excel functions

The following list contains all the Excel functions which can be used in K4 templates.

Functions A to C

ABS ACCRINT ACCRINTM ACOS


ACOSH ADDRESS AMORDEGRC AMORLINC
AND ASIN ASINH ATAN
ATAN2 ATANH AVEDEV AVERAGE
AVERAGEA AVERAGEIF AVERAGEIFS BESSELI
BESSELJ BESSELK BESSELY BETADIST
BETAINV BIN2DEC BIN2HEX BIN2OCT
BINOMDIST CEILING CEILING.PRECISE CHAR
CHIDIST CHIINV CHITEST CHOOSE
CLEAN CODE COLUMN COLUMNS
COMBIN COMPLEX CONCATENATE CONFIDENCE
CONVERT CORREL COS COSH
COUNT COUNTA COUNTBLANK COUNTIF
COUNTIFS COUPDAYS COUPDAYBS COUPDAYSNC
COUPNCD COUPNUM COUPPCD COVAR
COVARIANCE.P COVARIANCE.S CRITBINOM CUMIPMT
CUMPRINC

Functions D to G

DATE DATEDIF DATEVALUE DAVERAGE


DAY DAYS360 DB DCOUNT
DCOUNTA DDB DEC2BIN DEC2HEX
DEC2OCT DEGREES DELTA DEVSQ
DGET DISC DMAX DMIN
DOLLAR DOLLARDE DOLLARFR DPRODUCT
DSTDEV DSTDEVP DSUM DURATION
DVAR DVARP EDATE EFFECT
EOMONTH ERF ERFC ERRORTYPE
EURO EUROCONVERT EVEN EXACT
EXP EXPONDIST FACT FACTDOUBLE
FALSE FDIST FIND FINV
FINV FISHERINV FIXED FLOOR
FLOOR.PRECISE FORECAST FREQUENCY FTEST
FV FVSCHEDULE GAMMADIST GAMMAINV
GAMMALN GCD GEOMEAN GESTEP
GROWTH

Functions H to L

USERS’ MANUAL
Pag. 145 of 150
K4 Analytics | 2021.1 Appendix 1 – Supported Excel functions

HARMEAN HEX2BIN HEX2DEC HEX2OCT


HLOOKUP HOUR HYPGEOMDIST IF
IFERROR IMABS IMAGINARY IMARGUMENT
IMCONJUGATE IMCOS IMDIV IMEXP
IMLN IMLOG10 IMLOG2 IMPOWER
IMPRODUCT IMREAL IMSIN IMSQRT
IMSUB IMSUM INDEX INT
INTERCEPT INTRATE IPMT IRR
ISBLANK ISERR ISERROR ISEVEN
ISLOGICAL ISNA ISNONTEXT ISNUMBER
ISODD ISPMT ISREF ISTEXT
KURT LARGE LCM LEFT
LEN LINEST LN LOG
LOG10 LOGEST LOGINV LOGNORMDIST
LOOKUP LOWER

Functions M to Q

MATCH MAX MAXA MDETERM


MDURATION MEDIAN MID MIN
MINA MINUTE MINVERSE MIRR
MMULT MOD MODE MODE.MULT
MODE.SNGL MONTH MROUND MULTINOMIAL
N NA NEGBINOMDIST NETWORKDAYS
NOMINAL NORMDIST NORMINV NORMSDIST
NORMSINV NOT NOW NPER
NPV OCT2BIN OCT2DEC OCT2HEX
ODD ODDFPRICE ODDFYIELD ODDLPRICE
ODDLYIELD OFFSET OR PEARSON
PERCENTILE PERCENTILE.EXC PERCENTILE.INC PERCENTRANK
PERMUT PI PMT POISSON
POWER PPMT PRICE PRICEDISC
PRICEMAT PROB PRODUCT PROPER
PV QUARTILE QUARTILE.EXC QUARTILE.INC
QUOTIENT

USERS’ MANUAL
Pag. 146 of 150
K4 Analytics | 2021.1 Appendix 1 – Supported Excel functions

Functions R to S

RADIANS RAND RANDBETWEEN RANK


RANK.AVG RANK.EQ RATE RECEIVED
REPLACE REPT RIGHT ROMAN
ROUND ROUNDDOWN ROUNDUP ROW
ROWS RSQ SEARCH SECOND
SERIESSUM SIGN SIN SINH
SKEW SLN SLOPE SMALL
SQRT SQRTPI STANDARDIZE STDEV
STDEV.P STDEV.S STDEVA STDEVP
STDEVPA STEYX SUBSTITUTE SUBTOTAL
SUM SUMIF SUMIFS SUMPRODUCT
SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2
SYD

Functions T to Z

T TAN TANH TBILLEQ


TBILLPRICE TBILLYIELD TDIST TEXT
TIME TIMEVALUE TINV TODAY
TRANSPOSE TREND TRIM TRIMMEAN
TRUE TRUNC TTEST TYPE
UPPER VALUE VAR VAR.P
VAR.P VARA VARP VARPA
VDB VLOOKUP WEEKDAY WEEKNUM
WEIBULL WORKDAY XIRR XNPV
YEAR YEARFRAC YIELD YIELDDISC
YIELDMAT ZTEST

USERS’ MANUAL
Pag. 147 of 150
K4 Analytics | 2021.1 Appendix 2 - Known limitations

Appendix 2 - Known limitations


1. Aggregation: The data-entry of dates is not supported at aggregate levels.
2. Cascade Lists: The maximum number of lists that can be cascaded for drop-downs is 2.
3. Unsaved Data: Handling of unsaved data is not supported in conjunction with validation in the K4
template.
4. Filtering of Data:
• Specific filtering of data in Qlik Sense causes grey overlay and blocks editing. If a grey screen
appears, the user needs to press F5 to refresh the page and then make the selections by holding
down the CTRL key which seems to clear previous selections and only keep the new selection.
5. Master Table Object:
• Master Table object not rendering on first load with certain Qlik Sense versions. Change in
Filter/Bookmark selection will trigger the rendering of the Master Table object.
• we do not manage the Alias property when working in Master Table Mode
• When the Master Table Editor is used to create/delete records, it may be required to close the
dashboard and reopening it before accessing sheets containing K4 objects using the edited
table for dynamic rows generation.
6. K4, as all third-party extensions, is not supported by Qlik Sense on mobile devices.
7. Smartpaste

• does not work if the Sheet Name is changed

• does not work if including Conversation fields

• 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

It's a Qlik Sense issue which can be solved by:

• deleting the K4 Qlik Main Dataset properties


• saving & closing
• recreating the K4 Qlik Main Dataset properties
13. MS Teams®
• Export to PDF and Export to Excel work only when accessing from a browser and not in Teams
Desktop
14. Conversations
• limitation when working with Internet Explorer=>Right click on cell=>Select Conversation and the
Conversation does not appear
15. K4 Studio
• When working with QlikView, K4 Studio only works when accessing the application from within
the browser from QlikView Access Point. K4 Studio does not work with QlikView Deskop.
16. Excel Version Issues: If working with Excel 365 (Office 365), it may be the case that the new feature
Dynamic arrays which are only available in Excel 365 are possibly causing the below issues which are not
presented when working with traditional excel versions e.,g. (2019 or earlier)
• @ character placed in the K4GET function e.g. =@K4GET
• {} curly brackets placed before and afer the K4 custom functions
• converting templates via Template Manager i.e. white screen presented
• Please refer to this article for more information in the behaviour between Excel 365 and traditional
excel versions e.g. (2019 or earlier).
17. K4 Context Panel
• When working with Internet Explorer, the K4 Context Panel is overlaid on the K4 object
18. K4SAVE
• K4SAVE cannot save back to a field referenced by K4GET in the same template. A possible
workaround is to use K4SAVE to write-back to a different field in the same table and then use a
trigger to perform the desired action
19. The document currently selected field values (and the one set in the property Filters) cannot contain : or ;
or , or ' or " (colon,semicolon,comma,single quote, double quotes).

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?

WANT TO LEARN MORE?

Visit our Kommunity to access:

DOWNLOADS & DEMOS

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

You might also like