Ctrl-Q 3.9 brings colors to Qlik Sense master items
In previous versions Ctrl-Q could import master dimensions and measures from definitions in an Excel file into client-managed Qlik Sense Enterprise. Ctrl-Q 3.9 adds full color support to those imports.
As of v3.9 Ctrl-Q has full color support when dealing with master dimensions and measures.
This includes both showing definitions for master dimensions/measures as well as when importing such master items from an Excel file.
This Ctrl-Q feature works with client-managed Qlik Sense.
Master items (dimensions and measures) can make your life as a Qlik Sense developer a lot easier.
They ensure that the same definitions of dimensions, metrics and business measures are used throughout a Sense app.
It's however difficult to reuse the same master items in multiple Sense apps (we're talking about the client-manged Qlik Sense Enterprise product, btw).
When looking deep under the hood of a Sense app there are indications that master items could in fact be shared between apps, but no such features are surfaced in the Sense app editor or QMC.
So, if you don't want to re-create dozens or hundreds of master dimensions and measures in several different apps, you need some other solution.
Latest version of Ctrl-Q (which is still open source and free, of course!) offers a solution via its master-item-import command.
That command reads dimension and measure definitions from an Excel file, then creates master items based on those definitions.
The new feature in version 3.9.0 is full support for dimension and measure color.
In short: Anything you can do with respect to color via the Sense app editor you can also do via Ctrl-Q.
There are full docs on the GitHub page and a previous blog post also showed how to import master items from an Excel file.
Setting the stage
We will look at some use cases supported by Ctrl-Q, but first it's useful to understand what environment we'll be using.
The demos below were executed on Windows 10, using the excellent Windows Terminal, which is essentially an improved PowerShell terminal.
You can use regular PowerShell or cmd.exe on Windows too, or your favourite shell on Linux or macOS. Ctrl-Q is cross platform and provides binaries for all those OSs.
Master dimensions
View dimensions
Let's look at what master dimensions exist in a Sense app. First we'll check what options are available:
.\ctrl-q.exe master-item-dim-get --help
Usage: index master-item-dim-get [options]
get info about one or more master dimensions
Options:
--log-level <level> log level (choices: "error", "warn", "info", "verbose", "debug", "silly", default: "info")
--host <host> Qlik Sense server IP/FQDN
--port <port> Qlik Sense server engine port (default: "4747")
--schema-version <string> Qlik Sense engine schema version (default: "12.612.0")
--app-id <id> Qlik Sense app ID
--virtual-proxy <prefix> Qlik Sense virtual proxy prefix (default: "")
--secure <true|false> connection to Qlik Sense engine is via https (default: true)
--auth-user-dir <directory> user directory for user to connect with
--auth-user-id <userid> user ID for user to connect with
-a, --auth-type <type> authentication type (choices: "cert", default: "cert")
--auth-cert-file <file> Qlik Sense certificate file (exported from QMC) (default: "./cert/client.pem")
--auth-cert-key-file <file> Qlik Sense certificate key file (exported from QMC) (default: "./cert/client_key.pem")
--auth-root-cert-file <file> Qlik Sense root certificate file (exported from QMC) (default: "./cert/root.pem")
--id-type <type> type of identifier passed in the --master-item option (choices: "id", "name", default: "name")
--master-item <ids...> master dimension to retrieve. If not specified all dimensions will be retrieved
--output-format <format> output format (choices: "json", "table", default: "json")
-h, --help display help for command
A few things to notice:
- Most options have defualt values. Just skip those options if the default values are ok for your use case.
- The command works on a single Sense app identified by the --app-id option.
- Certificates are used to authenticate with Sense. Get those certs from the QMC export certificate section.
- If you don't specify one or more items using the --master-item option all master dimensions will be extracted from the app.
- The --id-type and --master-item are related. If --id-type is set to "id", the --master-item option is expected to contain one or more master item IDs. Similarly if --id-type is set to "name".
- You have a choice of showing the master dimensions as a table or as JSON, using the --output-format option.
.\ctrl-q.exe master-item-dim-get `
--host 192.168.100.109 `
--auth-cert-file C:\tools\ctrl-q\cert\client.pem `
--auth-cert-key-file C:\tools\ctrl-q\cert\client_key.pem `
--auth-user-dir LAB `
--auth-user-id goran `
--app-id 2933711d-6638-41d4-a2d2-6dd2d965208b `
--output-format table
2023-05-10T01:00:28.840Z info: -----------------------------------------------------------
2023-05-10T01:00:28.840Z info: | Ctrl-Q
2023-05-10T01:00:28.840Z info: |
2023-05-10T01:00:28.840Z info: | Version : 3.9.0
2023-05-10T01:00:28.840Z info: | Log level : info
2023-05-10T01:00:28.840Z info: |
2023-05-10T01:00:28.840Z info: | Command : master-item-dim-get
2023-05-10T01:00:28.840Z info: | : get info about one or more master dimensions
2023-05-10T01:00:28.840Z info: |
2023-05-10T01:00:28.840Z info: | Run Ctrl-Q with the '--help' option to see a list of all available options for this command.
2023-05-10T01:00:28.840Z info: |
2023-05-10T01:00:28.840Z info: | https://github.com/ptarmiganlabs/ctrl-q
2023-05-10T01:00:28.840Z info: ----------------------------------------------------------
2023-05-10T01:00:28.840Z info:
2023-05-10T01:00:28.840Z info: Get master dimensions
2023-05-10T01:00:29.183Z info:
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Dimensions (4 dimension(s) found in the app) │
├──────────────────────────────────────┬───────────┬─────────────┬────────────────────────────────┬───────────────────────────────┬────────────────────────┬──────────────────┬──────────────────┬─────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────┬──────────┬───────────┬──────────────────────────┬──────────────────────────┬──────────────────────────┬───────────┬──────────────┤
│ Id │ Type │ Title │ Description (static) │ Description (from expression) │ Description expression │ Label expression │ Definition count │ Definition │ Coloring │ Grouping │ Approved │ Published │ Publish time │ Created date │ Modified date │ Owner │ Tags │
├──────────────────────────────────────┼───────────┼─────────────┼────────────────────────────────┼───────────────────────────────┼────────────────────────┼──────────────────┼──────────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼──────────────┤
│ 1f20ce11-436e-4d63-951e-234e6a319512 │ dimension │ Salesperson │ The person who sold the unit. │ │ │ ='Salesperson' │ 1 │ Salesperson │ Value colors: │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-05-09T10:37:50.689Z │ 2023-05-09T14:59:09.954Z │ LAB\goran │ Staff, Sales │
│ │ │ │ │ │ │ │ │ │ {"colors":[{"value":"Afghanistan","baseColor":{"color":"#8a85c6","index":-1}},{"value":"Albania","ba │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ seColor":{"color":"#aaaaaa","index":-1}},{"value":"Algeria","baseColor":{"color":"#a16090","index":9 │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ }}],"nul":{"color":"#c8c7a9","index":16},"oth":{"color":"#ffec6e","index":-1},"pal":null,"single":nu │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ ll,"usePal":true,"autoFill":true} │ │ │ │ │ │ │ │ │
├──────────────────────────────────────┼───────────┼─────────────┼────────────────────────────────┼───────────────────────────────┼────────────────────────┼──────────────────┼──────────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼──────────────┤
│ 41ce19ef-bfb3-4036-82b9-7ea39829a455 │ dimension │ Country │ Country where a unit was sold. │ │ │ ='Country sold' │ 1 │ Country │ Dimension color: │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-05-09T10:37:50.689Z │ 2023-05-09T14:59:09.954Z │ LAB\goran │ Geo, DimCat1 │
│ │ │ │ │ │ │ │ │ │ {"color":"#bbbbbb","index":-1} │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ Value colors: │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ {"colors":[{"value":"Afghanistan","baseColor":{"color":"#8a85c6","index":-1}},{"value":"Albania","ba │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ seColor":{"color":"#aaaaaa","index":-1}},{"value":"Algeria","baseColor":{"color":"#a16090","index":9 │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ }}],"nul":{"color":"#c8c7a9","index":16},"oth":{"color":"#ffec6e","index":-1},"pal":null,"single":nu │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ ll,"usePal":true,"autoFill":true} │ │ │ │ │ │ │ │ │
├──────────────────────────────────────┼───────────┼─────────────┼────────────────────────────────┼───────────────────────────────┼────────────────────────┼──────────────────┼──────────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼──────────────┤
│ 5969c2a4-4f97-4dc4-98ea-8e594265cd81 │ dimension │ Color │ Color of sold unit │ │ │ ='Unit color' │ 1 │ UnitColor │ │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-05-09T10:37:50.689Z │ 2023-05-09T14:59:09.954Z │ LAB\goran │ Sales, Color │
├──────────────────────────────────────┼───────────┼─────────────┼────────────────────────────────┼───────────────────────────────┼────────────────────────┼──────────────────┼──────────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼──────────────┤
│ fd34f238-649b-4c98-85bc-cf872f00982a │ dimension │ Sales month │ Date in which a unit was sold. │ │ │ ='Sales month' │ 1 │ Month_Sales │ Dimension color: │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-05-09T10:37:50.689Z │ 2023-05-09T14:59:09.954Z │ LAB\goran │ │
│ │ │ │ │ │ │ │ │ │ {"color":"#bbbbbb","index":-1} │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└──────────────────────────────────────┴───────────┴─────────────┴────────────────────────────────┴───────────────────────────────┴────────────────────────┴──────────────────┴──────────────────┴─────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────┴──────────┴───────────┴──────────────────────────┴──────────────────────────┴──────────────────────────┴───────────┴──────────────┘
Ok, so the "Country" dimension seems to have "Geo" and "DimCat1" dimensions, as well as both a general dimension color "#bbbbbb" and several per-value colors (for example the 9th pre-defined palette color #a16090). The Sense UI can be used to verify this is correct:
If you are only interested in the definition of the "Country" master dimension the command looks like this:
.\ctrl-q.exe master-item-dim-get `
--host 192.168.100.109 `
--auth-cert-file C:\tools\ctrl-q\cert\client.pem `
--auth-cert-key-file C:\tools\ctrl-q\cert\client_key.pem `
--auth-user-dir LAB `
--auth-user-id goran `
--app-id 2933711d-6638-41d4-a2d2-6dd2d965208b `
--id-type name `
--master-item Country `
--output-format table
2023-05-10T01:15:07.972Z info: -----------------------------------------------------------
2023-05-10T01:15:07.972Z info: | Ctrl-Q
2023-05-10T01:15:07.972Z info: |
2023-05-10T01:15:07.972Z info: | Version : 3.9.0
2023-05-10T01:15:07.972Z info: | Log level : info
2023-05-10T01:15:07.972Z info: |
2023-05-10T01:15:07.972Z info: | Command : master-item-dim-get
2023-05-10T01:15:07.972Z info: | : get info about one or more master dimensions
2023-05-10T01:15:07.972Z info: |
2023-05-10T01:15:07.972Z info: | Run Ctrl-Q with the '--help' option to see a list of all available options for this command.
2023-05-10T01:15:07.972Z info: |
2023-05-10T01:15:07.972Z info: | https://github.com/ptarmiganlabs/ctrl-q
2023-05-10T01:15:07.972Z info: ----------------------------------------------------------
2023-05-10T01:15:07.987Z info:
2023-05-10T01:15:07.987Z info: Get master dimensions
2023-05-10T01:15:08.300Z info:
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Dimensions (1 dimension(s) found in the app) │
├──────────────────────────────────────┬───────────┬─────────┬────────────────────────────────┬───────────────────────────────┬────────────────────────┬──────────────────┬──────────────────┬────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────┬──────────┬───────────┬──────────────────────────┬──────────────────────────┬──────────────────────────┬───────────┬──────────────┤
│ Id │ Type │ Title │ Description (static) │ Description (from expression) │ Description expression │ Label expression │ Definition count │ Definition │ Coloring │ Grouping │ Approved │ Published │ Publish time │ Created date │ Modified date │ Owner │ Tags │
├──────────────────────────────────────┼───────────┼─────────┼────────────────────────────────┼───────────────────────────────┼────────────────────────┼──────────────────┼──────────────────┼────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼──────────────┤
│ 41ce19ef-bfb3-4036-82b9-7ea39829a455 │ dimension │ Country │ Country where a unit was sold. │ │ │ ='Country sold' │ 1 │ Country │ Dimension color: │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-05-09T10:37:50.689Z │ 2023-05-09T14:59:09.954Z │ LAB\goran │ Geo, DimCat1 │
│ │ │ │ │ │ │ │ │ │ {"color":"#bbbbbb","index":-1} │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ Value colors: │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ {"colors":[{"value":"Afghanistan","baseColor":{"color":"#8a85c6","index":-1}},{"value":"Albania","ba │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ seColor":{"color":"#aaaaaa","index":-1}},{"value":"Algeria","baseColor":{"color":"#a16090","index":9 │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ }}],"nul":{"color":"#c8c7a9","index":16},"oth":{"color":"#ffec6e","index":-1},"pal":null,"single":nu │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ ll,"usePal":true,"autoFill":true} │ │ │ │ │ │ │ │ │
└──────────────────────────────────────┴───────────┴─────────┴────────────────────────────────┴───────────────────────────────┴────────────────────────┴──────────────────┴──────────────────┴────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────┴──────────┴───────────┴──────────────────────────┴──────────────────────────┴──────────────────────────┴───────────┴──────────────┘
Import dimensions from Excel file
The command for importing master dimensions from an Excel file into Sense might seem complex, but when looking closer it's not that bad.
.\ctrl-q.exe master-item-import --help
Usage: index master-item-import [options]
create master items based on definitions in a file on disk
Options:
--log-level <level> log level (choices: "error", "warn", "info", "verbose", "debug", "silly", default: "info")
--host <host> Qlik Sense server IP/FQDN
--port <port> Qlik Sense server engine port (default: "4747")
--schema-version <string> Qlik Sense engine schema version (default: "12.612.0")
--app-id <id> Qlik Sense app ID
--virtual-proxy <prefix> Qlik Sense virtual proxy prefix (default: "")
--secure <true|false> connection to Qlik Sense engine is via https (default: true)
--auth-user-dir <directory> user directory for user to connect with
--auth-user-id <userid> user ID for user to connect with
-a, --auth-type <type> authentication type (choices: "cert", default: "cert")
--auth-cert-file <file> Qlik Sense certificate file (exported from QMC) (default: "./cert/client.pem")
--auth-cert-key-file <file> Qlik Sense certificate key file (exported from QMC) (default: "./cert/client_key.pem")
--auth-root-cert-file <file> Qlik Sense root certificate file (exported from QMC) (default: "./cert/root.pem")
-t, --file-type <type> source file type (choices: "excel", default: "excel")
--file <filename> file containing master item definitions
--sheet <name> name of Excel sheet where dim/measure flag column is found
--col-ref-by <reftype> how to refer to columns in the source file. Options are by name or by position (zero based) (choices: "name", "position", default: "name")
--col-item-type <column position or name> column where dim/measure flag is found. Use "dim-single" in that column to create master dimension, "measure" for master measure (default: "Master item type")
--col-master-item-name <column position or name> column number (zero based) or name to use as master item name (default: "Master item name")
--col-master-item-descr <column position or name> column number (zero based) or name to use as master item description (default: "Description")
--col-master-item-label <column position or name> column number (zero based) or name to use as master item label (default: "Label")
--col-master-item-expr <column position or name> column number (zero based) or name to use as master item expression (default: "Expression")
--col-master-item-tag <column position or name> column number (zero based) or name to use as master item tags (default: "Tag")
--col-master-item-color <column position or name> column number (zero based) or name to use as color for dimensions/measures (default: "Color")
--col-master-item-per-value-color <column position or name> column number (zero based) or name to use as per-value/segment color for dimensions/measures (default: "Per value color")
--limit-import-count <number> import at most x number of master items from the Excel file. Defaults to 0 = no limit (default: 0)
-h, --help display help for command
The Excel file used in the example below is available for download from GitHub (click the "Download raw file" icon to the right to get the file).
Looks like this:
Note the "Color" and "Per value" columns. They take a JSON structure that defined what color should be used with the master dimension itself, as well as per-value colors.
The JSON structure just happens to be the same as exported via the master-item-dim-get command (se above)... meaning it's easy to first set the colors you want in the Sense UI, get a list of the dimension using Ctrl-Q, get the JSON from the output from Ctrl-Q and finally use that JSON in the Excel file.
You can then import those dimensions into any number of Sense apps, with data, definitions and visual consistency as a result.
Master measures
View measures
The command for listing master measures is identical to ditto command for dimensions:
.\ctrl-q.exe master-item-measure-get --help
Usage: index master-item-measure-get [options]
get info about one or more master measures
Options:
--log-level <level> log level (choices: "error", "warn", "info", "verbose", "debug", "silly", default: "info")
--host <host> Qlik Sense server IP/FQDN
--port <port> Qlik Sense server engine port (default: "4747")
--schema-version <string> Qlik Sense engine schema version (default: "12.612.0")
--app-id <id> Qlik Sense app ID
--virtual-proxy <prefix> Qlik Sense virtual proxy prefix (default: "")
--secure <true|false> connection to Qlik Sense engine is via https (default: true)
--auth-user-dir <directory> user directory for user to connect with
--auth-user-id <userid> user ID for user to connect with
-a, --auth-type <type> authentication type (choices: "cert", default: "cert")
--auth-cert-file <file> Qlik Sense certificate file (exported from QMC) (default: "./cert/client.pem")
--auth-cert-key-file <file> Qlik Sense certificate key file (exported from QMC) (default: "./cert/client_key.pem")
--auth-root-cert-file <file> Qlik Sense root certificate file (exported from QMC) (default: "./cert/root.pem")
--id-type <type> type of identifier passed in the --master-item option (choices: "id", "name", default: "name")
--master-item <ids...> master measure to retrieve. If not specified all measures will be retrieved
--output-format <format> output format (choices: "json", "table", default: "json")
-h, --help display help for command
As the command is the same as for dimensions, let's dive straight into a command that will list all master measures in a Sense app:
.\ctrl-q.exe master-item-measure-get `
--host 192.168.100.109 `
--auth-cert-file C:\tools\ctrl-q\cert\client.pem `
--auth-cert-key-file C:\tools\ctrl-q\cert\client_key.pem `
--auth-user-dir LAB `
--auth-user-id goran `
--app-id 2933711d-6638-41d4-a2d2-6dd2d965208b `
--output-format table
2023-05-10T01:25:30.834Z info: -----------------------------------------------------------
2023-05-10T01:25:30.834Z info: | Ctrl-Q
2023-05-10T01:25:30.834Z info: |
2023-05-10T01:25:30.834Z info: | Version : 3.9.0
2023-05-10T01:25:30.834Z info: | Log level : info
2023-05-10T01:25:30.834Z info: |
2023-05-10T01:25:30.834Z info: | Command : master-item-measure-get
2023-05-10T01:25:30.834Z info: | : get info about one or more master measures
2023-05-10T01:25:30.834Z info: |
2023-05-10T01:25:30.834Z info: | Run Ctrl-Q with the '--help' option to see a list of all available options for this command.
2023-05-10T01:25:30.834Z info: |
2023-05-10T01:25:30.834Z info: | https://github.com/ptarmiganlabs/ctrl-q
2023-05-10T01:25:30.834Z info: ----------------------------------------------------------
2023-05-10T01:25:30.834Z info:
2023-05-10T01:25:30.834Z info: Get master measures
2023-05-10T01:25:31.148Z info:
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Measures (6 measure(s) found in the app) │
├──────────────────────────────────────┬─────────┬────────────────────────┬───────────────────────────────────────────────────┬──────────────────┬──────────────────┬──────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────┬───────────────────────────────────────┬──────────┬──────────┬───────────┬──────────────────────────┬──────────────────────────┬──────────────────────────┬───────────┬───────────┤
│ Id │ Type │ Title │ Description │ Label │ Label expression │ Definition │ Coloring │ Number format │ Grouping │ Approved │ Published │ Publish time │ Created date │ Modified date │ Owner │ Tags │
├──────────────────────────────────────┼─────────┼────────────────────────┼───────────────────────────────────────────────────┼──────────────────┼──────────────────┼──────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼───────────┤
│ 0d2b1a9c-efd2-4731-aaa4-34fab1247252 │ measure │ Revenue EUR │ Revenue during selected time period. │ ='Revenue' │ ='Revenue' │ Sum(Revenue) │ Segment colors: │ {"qType":"U","qnDec":10,"qUseThou":0} │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-03-20T20:01:55.449Z │ 2023-05-09T14:59:09.954Z │ LAB\goran │ Sales │
│ │ │ │ │ │ │ │ {"colors":[{"color":"#006580","index":6},{"color":"#ac4d58","index":10},{"color":"#4477aa","index":- │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ 1},{"color":"#7db8da","index":-1}],"breakTypes":[true,true,false],"limits":[0.223,0.491,0.728],"limi │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ tType":"percent"} │ │ │ │ │ │ │ │ │ │
├──────────────────────────────────────┼─────────┼────────────────────────┼───────────────────────────────────────────────────┼──────────────────┼──────────────────┼──────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼───────────┤
│ 26aad7f3-21dd-478e-96ef-94044f05a7d6 │ measure │ Revenue EUR (LY) │ Revenue during last year. │ ='Revenue LY' │ ='Revenue LY' │ Sum(Revenue_LY) │ │ {"qType":"U","qnDec":10,"qUseThou":0} │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-03-20T20:01:55.449Z │ 2023-05-09T14:59:09.954Z │ LAB\goran │ Sales, LY │
├──────────────────────────────────────┼─────────┼────────────────────────┼───────────────────────────────────────────────────┼──────────────────┼──────────────────┼──────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼───────────┤
│ 587d945f-83d5-43b3-89d7-851e4f52f51c │ measure │ No. of sold units │ Number of units sold during selected time period. │ ='Sold units' │ ='Sold units' │ =Sum(UnitsInOrder) │ Measure color: │ {"qType":"U","qnDec":10,"qUseThou":0} │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-03-20T20:01:55.449Z │ 2023-05-09T14:56:44.475Z │ LAB\goran │ Sales │
│ │ │ │ │ │ │ │ {"color":"#8a85c6","index":8} │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ Segment colors: │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ {"colors":[{"color":"#006580","index":6},{"color":"#ac4d58","index":10},{"color":"#4477aa","index":- │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ 1},{"color":"#7db8da","index":-1}],"breakTypes":[true,true,false],"limits":[0.223,0.491,0.728],"limi │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ tType":"percent"} │ │ │ │ │ │ │ │ │ │
├──────────────────────────────────────┼─────────┼────────────────────────┼───────────────────────────────────────────────────┼──────────────────┼──────────────────┼──────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼───────────┤
│ 80a97ff8-4a9c-4bd8-b7da-d54026f8e186 │ measure │ Profit EUR │ Profit during selected time period. │ ='Profit' │ ='Profit' │ Sum(Profit) │ │ {"qType":"U","qnDec":10,"qUseThou":0} │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-03-20T20:01:55.449Z │ 2023-05-09T14:59:09.954Z │ LAB\goran │ Sales │
├──────────────────────────────────────┼─────────┼────────────────────────┼───────────────────────────────────────────────────┼──────────────────┼──────────────────┼──────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼───────────┤
│ a945d094-7842-4b84-8ed6-7b3e19df2ece │ measure │ No. of sold units (LY) │ Number of units sold last year. │ ='Sold units LY' │ ='Sold units LY' │ Sum(UnitsInOrder_LY) │ Measure color: │ {"qType":"U","qnDec":10,"qUseThou":0} │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-03-20T20:01:55.449Z │ 2023-05-09T14:56:44.475Z │ LAB\goran │ Sales, LY │
│ │ │ │ │ │ │ │ {"color":"#8a85c6","index":8} │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├──────────────────────────────────────┼─────────┼────────────────────────┼───────────────────────────────────────────────────┼──────────────────┼──────────────────┼──────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────┼──────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────┼──────────────────────────┼───────────┼───────────┤
│ b4279570-8898-4bbc-b9fb-8138087d0b63 │ measure │ Profit EUR (LY) │ Profit during last year │ ='Profit LY' │ ='Profit LY' │ Sum(Profit_LY) │ │ {"qType":"U","qnDec":10,"qUseThou":0} │ N │ false │ false │ 1753-01-01T00:00:00.000Z │ 2023-03-20T20:01:55.449Z │ 2023-05-09T14:59:09.954Z │ LAB\goran │ Sales, LY │
└──────────────────────────────────────┴─────────┴────────────────────────┴───────────────────────────────────────────────────┴──────────────────┴──────────────────┴──────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────┴───────────────────────────────────────┴──────────┴──────────┴───────────┴──────────────────────────┴──────────────────────────┴──────────────────────────┴───────────┴───────────┘
Let's look closer at the "No. of sold units" measure:
- It has a measure color of #8a85c6, which is the 8th color in the theme being used.
- It has 4 segment colors and some other properties associated with segment colors. Not all of these properties are exposed in the Sense user interface.
Import measures from Excel file
The process is exactly the same as for dimensions - please see that section above.
Pre-defined color themes
Client-managed Qlik Sense can be extended with new themes.
The themes define both colors to use, background images, font sizes and more.
If you want to explore Sense themes I recommend checking out sensetheme.com, where you can create your own new theme or check out existing sample themes in their gallery.