This post is the second in a series that detail the key features in version 5.3.5.0 of askiadesign & askiaanalyse. The blog post on askiadesign 5.3.5.0 can be found here.

Much development work has been invested in 5.3.5.0 to take our Analysis software to the next level. A detailed list of these great new features can be found in the version roadmap. Below are a summary and examples of several key developments:

Table of contents:

    1. Table arithmetic (Cleaning script)
    2. Aggregated scripts
    3. Table arithmetic (Calculation arithmetic)
    4. Table suppression
    5. Paste captions
    6. New keywords in script calculations
    7. New options in level

For items 1 to 3 there is a range of articles on our help centre which go into a greater amount of detail than we will in this post. The objects, properties and methods for the new scripting language are summarised in this document.

Table arithmetic (Cleaning script)

The ‘Cleaning script’ is a process that runs immediately after your table is created. It changes the appearance of a table based on the figures it has in it. So, for example, you can have sophisticated conditional formatting or fill text and numbers into cells of your choice using syntax. Here I will demonstrate how to change the default column significance lettering to display a shape of a particular colour.

In the table below we are testing each column against the total column only – we can see if it is significantly different by the letters returned from some of the pre-set options: higher (“A+”) or lower (“-A+”).

clean2

What if the requirement is to show something other than these pre-set options e.g. a green ▲ for higher and a red ▼ for lower

The ‘Cleaning script’ window is found in the Tab definition > General tab > Settings > Sorting. We can achieve this requirement by adding the script below. It’s basically script that defines the data range first (StartX, StartY) (2, 5) to (MaxX, MaxY) (10, 18).Then it carries out a find and replace to insert the shapes and formats where required.

clean4

The portfolio and .qes file containing the tab template shown above can be downloaded here. The end result is as follows:

clean1

Aggregated scripts

In basic terms, aggregated scripts are a way of retrieving aggregated information e.g. a mean or median. So you can now create coded variables from this point like: those above mean / those below mean and this variable won’t require additional work when new data is added to the .qes file (and the mean changes).

The example .qes file can be downloaded here. Take a look at variable avg#3. We are able to display the average time in the correct format by first working out the mean of Q4a. We use Q4a.data.mean() (17.73) to do this. In the second line we work out the mean with no decimal places (17). In the third line we work out the difference 0.73 and re-factor it be between 0 – 60 (44). Then, finally, we insert these numbers into the text we want to display: “Average Time – [17:44]”

as1

The above example shows aggregated scripts for use in created variables but they can also be used in the cleaning script and calculation arithmetic script modes. The latter is demonstrated in the example portfolio in tab definition: Average Time – Method 1. Here there is the calculation: Average Time which performs a similar format adjustment on our mean for Q4a

Table arithmetic (Calculation arithmetic)

In the example .qes file and portfolio which can be downloaded here, open the tab definition: 2.TA_Calc_Arithmetic. 

Here you will see a 10 point rating scale for 10 brands. The aim is to create a simple calculation:

100 * sum of (count x rating) for one brand / sum of (count x rating) for all brands

So for the first brand it would be: 100 * (182) / total of all entries in the ‘Sum’ row (1498) = 12.15

ta2

When using calculation arithmetic we think of every cell in the table as having x & y co-ordinates e.g. the top left cell has co-ordinates (1,1)

We define our range of cells we want to sum across:

j = CurrentTable.startX to CurrentTable.maxX

Where startX is the first column which contains data (3) and maxX is the last column (12) now we sum up all the values contained in these cells on the 12th row (Sum) using the following syntax:

i = i + CurrentTable.getcell(j,12).value

 Note, here you can replace the y co-ordinate of 12 with:  CurrentTable.maxY – 1  – this also means the 12th row but will automatically look at the 13th row if one more rating is added to the scale.

Now that we have our ‘total of sums’ we divide the sum calculation, Calc(1), by this to get our desired result using: return (Calc(1) / i) * 100

You may have noticed that we now use Calc(1) instead of the calculation reference we used previously {1}. This is necessary for adding the new scripting language in this calculation type. References previously saved as {n} here will be automatically updated to Calc( n ).

Table suppression

For the first time in Analyse, we have the ability to fully suppress tables from the output if the table base is below a certain number. You have the flexibility to set this threshold in the same way as you can for setting row / column / edge suppression:

bts1

The usual requirement is blank table suppression which removes empty tables from outputs. In this case you would of course set ‘if base <=’ to 0

Paste captions

A new option, Paste captions, has been added to the context menu when you are working in the row / columns / edges of your tab definitions. If you’ve ever had to make a large number of text changes to variables or code captions in the tab definition, you’ll know it would have taken time to paste/write them in to each of these elements individually.

Now you can create your updated text in Word or Excel, for example, and paste captions in wholesale on to your variables or codes to save a lot of time when faced with this sort of exercise.

New keywords in script calculations.

You can now use RowQuestion, RowSubQuestion, ColQuestion, ColSubQuestion in calculations by script

You may be aware how to use script calculations in Analyse:

kw1

If not, there is a fairly informative article here which steps through some usage examples. There is another article here which concentrates on scripts used to create mean summary tables.

Basically, it’s a script stored in a calculation which allows you to access or filter your results by a question which is not in your tab definition.

The example files are here. Open up ‘6.AS_Keywords_Portfolio.xml’ and in the tab definition there is a demonstration of this in the calculation: ‘n (q4)’. The script here is  ??q4?? Has {1;2}

This filters the counts in our table by those who answered ‘Excellent’ or ‘Very good’ at q4.

This is a question specific script. It means that should we be required to apply this for the same table set-up but different questions then the calculation would not work. e.g. loop1 (replaced with loop2) and q4 (replaced with q5). In Analyse 5.3.5.0 we have introduced some new keywords to circumvent this inflexibility.

Take a look at the calculation ‘n (Generic)’. The script here is: RowSubQuestion Has {1;2}

kw2

The results here are the same as those given by ‘n (q4)’ but, of course, now allow flexibility to use this tab template definition across different loops / variables

New options in level

There are two new options added to the ‘Level’ drop-down box in the tab template:

rl_cl_options

The aim here is much the same as in the previous section, to reduce the number of tab templates we need to create.

An example is when you create a summary table (let’s say for loop1) and want to show figures for the response level rather than the respondent level. We set the level here to loop1 and save the tab template. Previously we couldn’t use the same tab template for the summary table for, let’s say, loop2 but now we can using these options.

The new keywords in script calculations and these level options add a great new level of efficiency for tab template management.