Qlik Community

Qlik Design Blog

All about product and Qlik solutions: scripting, data modeling, visual design, extensions, best practices, etc.

Employee
Employee

NumericalAbbreviation Variable

One of the new features in the April 2018 release of Qlik Sense was the addition of the NumericalAbbreviation variable.  This variable allows users to specify the numeric abbreviations that are used when a numeric value has an Auto number format.  This was great because by default, G is used to indicate billions and my preference is to use B.  Now, I can do that by editing the NumericalAbbreviation variable in my script.  If you are familiar with scripting, you know that the first few lines on the Main tab in the script are SET variable statements that indicate what abbreviations and values you would like to use to represent certain data in your app.  For example, in the script below, the MonthNames variable is set to how I would like to abbreviate months in my app.

SET month.png

With the NumericalAbbreviation variable, I can specify how I will like the numeric abbreviation to appear.  By default, it is set like this:

SET default.png

If you created an app using a release prior to the April 2018 release, you will not see this variable on the Main tab in your script but you can add it to your script along with the other variables statements.  The easiest way to do this is to copy and paste it from Qlik Help.

 

In the app screenshot below, you can see the G used in the Total Gross KPI and in the Top 10 Theaters bar chart (bottom left).

G-sheet.png

Since my preference is to use the B instead of G to show billions, I changed the NumericalAbbreviation variable to be:

SET - Copy.png

Now the app looks like this:

B-sheet.png

A small, easy tweak to the script, allowed me to change the numeric abbreviation in the app.  I should note that the numeric abbreviation is used only when Numbering Format is set to Auto.  So, if the Numbering Format is set to something other than Auto such as Money or Number, the NumericAbbreviation variable is not used and the format that you specify in the properties of the object is used.

 

In this blog, I showed one example of how the NumericalAbbreviation variable can be used but it can also be used to add spacing before the abbreviation or other custom abbreviations, if you choose.  This seems like a small feature but it has a large impact providing users with more flexibility and control over how the data is displayed.  To learn about other new features released in April, check out Michael Tarallo’s Qlik Sense – What’s New April 2018 video.

 

Thanks,

Jennell

5 Comments
MVP
MVP

Hi Jennell -

I have seen a lot of people asking about this, so this is def. huge. Thanks for sharing this information. Also, do you know what is bold part of the set statement used for?

Set NumericalAbbreviation='3:t;6:M;9:B;12:T;15Smiley Tongue;18:E;21:Z;24:Y;-3:m;-6:µ;-9:n;-12Smiley Tongue;-15:f;-18:a;-21:z;-24:y';

93 Views
vkish16161
Contributor III

10 power -3, 10 power -6, 10 power -12 etc.

Basically inverted exponents.

i.e. milli, micro, nano, pico etc.

93 Views
jerifortune
Contributor II

Nice to know. Thanks

0 Likes
93 Views
kenphamvn
Contributor III

Hi jmc

NumericalAbbreviation not work when export charts object from storytelling to Powerpoit or PDF.

Here my NumericalAbbreviation setting

SET NumericalAbbreviation='3:N;6:Tr;9:T;12:NT;15Smiley Tongue;18:E;21:Z;24:Y;-3:m;-6:μ;-9:n;-12Smiley Tongue;-15:f;-18:a;-21:z;-24:y';

it's work perfectly on Dasboards and StoryTelling

9-24-2018 9-03-44 AM.png

but when export to PDF or Power point file, It seems to not be working

9-24-2018 9-04-44 AM.png

i'm test on Qlik June 2018 Path 1

Regards

An Pham

0 Likes
93 Views
alexometis
Contributor II

Sounds like you should log a bug with Qlik Support and/or test it in the September version. I logged an issue about the map object's scales not obeying the NumericalAbbreviation settings and it was fixed in the Sept release, so they're pretty responsive.

0 Likes
93 Views