Personal Business Intelligence (PerBI) Scripting

What Is Scripting?

Simple PerBi view
In the context of PerBI scripting is a way of manipulating the data using something that looks a bit like programming but isn't.

If you talk about doing a mail-merge in a word processor, people often say "that sounds complicated", then they do it and find that it wasn't that painful after all.

For many people scripting is something new, but it is not difficult!

What Soft Of Thing 1?

PerBi And Underlying Screen Shot Imagine that you are looking at an item such as a car which for which you know the age. Your data may have ages ranging from 0 to 50 years, but you want to look at the data in bands of 5 years.

If we then decide that we don't find that the be useful, it would be better to band them is 4 year bands it is a trivial change. If we want to band them 0-2, 2-3, 3-5,5 plus is clear that this should also be fairly easy but clearly this is so arbitrary that no generic dialog box could cope with this.

Normally models are created with a number of "spare" columns, these columns are used to store calculated data.

The script shows how we achieve this, apart from the comment and the line that says Let !UserInt = !VehicleAge/5 all of the code was created automatically when you asked to create an ASL script.

What Soft Of Thing 2?

Multiple charts In this case we want to split our policy holders into the groups Good and Bad, based on the number of years they have been driving without a claim.

The second script shows that this is almost as simple as the first task.

No, that does look complicated!

Multiple charts Look again, most of the two scripts are the same and this same bit is used time and time again, so you will become familiar with it very quickly.

All it is doing is;
  • Create some memories, like on a calculator.

  • Ensure that no Data Manipulation Commands have dropped any of the data.

  • Go to the first row in the model.

  • Looking at the number of years NCD and storing good or bad based on that number.

  • The While/EndWhile/GetNextRow stuff just means keep on doing this for all the rows in the model.

Prev   Next