Tuesday, 11 January 2011

Alteryx 2011 - New Features - New Charting functionality

Alteryx 2011 brings a brand new shiny charting tool. And very nice it is too!  It has a host of new chart types and a range of new options.  I'm not going to go through all the options in detail here, but instead give you a brief preview of some charts I have produced with it.

It currently sits in the Laboratory section of the ToolBox which according to the help file is for "new tools that have documented, known issues or are not feature complete.  They have been tested for stability and will be optimized in stable program updates".  Though I have to say I didn't come across any issues while creating the below samples.

Also check out the Alteryx blog on Box and Whisker Charts here.







Friday, 7 January 2011

Alteryx 2011 - New Features - Tree Question in Wizard/Macros

Alteryx 2011 brings a great new feature to the wizard or macro creator's arsenal: the Tree question type.  It allows you to present a selection of options to the user in a hierarchical structure.

It is added in the same way as any other question:



Data Source

It has five options in terms of choosing its source data:
  • Allocate Geography
  • Allocate Variables
  • File System Directory
  • Custom XML
  • Custom File/Database
Allocate geography and variables will display tree views of the allocate geographies or variables from the allocate data sets on a users machine:


File System Directory will display a tree view of files in a folder (Note: Only Files are selectable):


Custom XML lets you define your own tree using a XML file.  The XML needs to have the following structure:


The n attributes are the display names and the k attributes are the key values which get passed to your module.  The v elements define the tree structure or hierarchy.
Which results in the following tree structure:


The final option allows population of the tree from a custom file or database.  The structure needs to be like the below:

This gives the same tree as with my custom XML example above. 

Note: There is an important difference between using a file/database source and a XML source.  In an XML source you define the tree structure using the v elements; the names and keys can be whatever you want.  In a file/database source it is the key values which define the tree structure; so in this example the fact that 0 is a substring of 01 means that Delaware sits under USA in the tree structure.

Additional Options

There are two additional options to set up.
  • A check box which determines whether a single or multiple items can be selected.
  • A numeric value which determines how many lines the tree will display before needing to scroll.
Return Values

If you are using an allocate data source for your tree there are two options for the return data, selectable from the question's properties:
  • Save Values as XML - returns values in an XML format suitable for updating allocate tools using an "update raw XML" action.
  • Save Values as Allocate Workspace snippet - does what it says and can be used to update allocate tools via an "update/change value" action.
If you have a File System Directory data source the selected files are returned with full paths separated by new line characters.  This could be used to update a dynamic input using a text to columns tool as in the below example:


When you get to a custom data source things begin to get a little more challenging for the macro/wizard developer.  The difficulty is that the question will return the minimum possible data to represent the options selected and does not return any indication of hierarchy.  So still using my custom XML example above:



Returns 011013021¶024¶025










Returns 01021¶024¶025
Returns 0
Now if you have data at County level, which you wish to filter based on the user's selection how do you deal with these different cases?

The best solution I have at the moment is a filter updating with an "update/change value" action using "Update using a formula" with the below formula:

'[Key] in ("' + REGEX_Replace([Custom XML Tree View], '\n', '","') + '")' +
' or left([Key],2) in ("' + REGEX_Replace([Custom XML Tree View], '\n', '","') + '")' +
' or left([Key],1) in ("' + REGEX_Replace([Custom XML Tree View], '\n', '","') + '")'
 
The REGEX_Replace([Custom XML Tree View], '\n', '","') part converts the newline separated list to a comma separated quote qualified list and the three "in" statements check at the three levels of the hierarchy.

As always if you have a better solution or any other comments feel free to post below.

Tuesday, 4 January 2011

Alteryx 2011 - New Features - New Spatial Functions

Alteryx 2011 adds two new spatial functions to the formula toolbox:
  • ST_CreateLine(point1, point2, ...)
  • ST_CreatePolygon(obj1, obj2, ...)
Which pretty much do what they say.

So ST_CreateLine(ST_CreatePoint(1,1), ST_CreatePoint(1,2), ST_CreatePoint(2,2),  ST_CreatePoint(2,1)) gives us a spatial line:

and ST_CreatePolygon(ST_CreatePoint(1,1), ST_CreatePoint(1,2), ST_CreatePoint(2,2), ST_CreatePoint(2,1)) gives us a polygon:



Great for creating your own charts (e.g. Gannt or Polar) or other interesting uses of Alteryx's spatial functions.

Friday, 31 December 2010

Alteryx 2011 - New Features - Connection Progress

I don't know how many Alteryx users are familiar with Microsoft's SQL Server Integration Services (SSIS)?  It is Mircosoft's attempt at an Alteryx Engine type tool which I could write a whole article about.  But I'm not going to risk boring you with what I see as SSIS's shortcomings.  All I will say is I was very disappointed with SSIS when it was released and when I started using Alteryx I never looked back.

However this time last year there were two features of SSIS which I thought Alteryx lacked. 

The first was the ability to hide away sections of the module in collapsible sections.  At Extend 2010 Ned demonstrated this same functionality in Alteryx courtesy of Tool Containers.  After that demo I mentioned to Ned that now there was only one thing which I thought was better about SSIS than Alteryx, namely the displaying of record counts on data connections.

Well now in Alteryx 2011 we have connection progress in real time as data flows through them.  These are a great new feature and allow users to:
  • See progress of the module more easily
  • See mistakes in their module before it completes processing
  • Easily check joins and filters are behaving as expected without needing to cross reference to the log
  • Identify inefficiencies in their modules
The below video shows them in action:

Tuesday, 28 December 2010

Alteryx 2011 - New Features - Keyboard Shortcuts

This was going to be a post on the new keyboard shortcuts available in Alteryx 2011, but as I was writing it I found that there were already some keyboard shortcuts which I didn't know about in Alteryx 5.0.  So I thought I would make this a complete list of all the keyboard shortcuts available in Alteryx (for those of you who like that kind of thing...)

Ctrl+N - New Module
Ctrl+O - Open Module
Crtl+S - Save Module
Crtl+R - Run Module/Cancel Module

F1 - Help on what is selected
F5 - Refresh Config

Crtl+Z - Undo
Ctrl+Y - Redo

Ctrl+X - Cut
Ctrl+C - Copy
Ctrl+V - Paste

Del  - Delete what is selected

Ctrl+F - Find Tool

Ctrl+Tab - Switch between open modules

Ctrl+Mouse Scroll Wheel - Zoom in/out

New in Alteryx 2011

Ctrl+Alt+B - Show Toolbar
Ctrl+Alt+T - Show Toolbox
Ctrl+Alt+V - Show Overview
Ctrl+Alt+O - Show Output Window
Ctrl+Alt+P - Show Properties Window

Please let me know if there are any more that I have missed off the list.

Wednesday, 22 December 2010

Alteryx 2011 Released

A slightly belated post due to my busy life at the moment, but no less exciting for the delay.  Alteryx 2011 is now released!  Check out the offical blog here.

It is fully rebranded with the new Alteryx brand colors and logo which look great:


It comes with a whole host of exciting new features which are going to enable users to do more with Alteryx and do things more easily!

Some of the new features include (follow the links for more details):
Looks like it's going to be an exciting release!  Look out for blog posts on some of the new features here when I have a bit more time.

Thursday, 11 November 2010

Inspired Ingenuity or Overly Engineered? (Part 2)

So I think my solution was probably inspired somewhat by my gantt chart module.  I was trying to visualise the problem and realised I could actually turn the problem into a spatial one and then use Alteryx's spatial tools to solve it.

So here it is:

Imagine a rectangle for each task sitting on a time line (like a gantt chart but with all the tasks on one row).



If we make the length of the rectangles proportional to the length of the tasks,  then we can say the area of the rectangles represents the time taken for that task.

Now imagine another rectangle on the same time line representing the entire reporting period.  The area of this rectangle (in green below) represents the total time available.



Now if we cut the smaller task rectangles from the large reporting period rectangle, then the area remaining of the larger rectangle is the unused time.

With the spatial tools of Alteryx, cutting one set of polygons from another is easy.  So that's what I did:



You can download the module here:



I think you'll agree a rather unique way of using the spatial capabilities of Alteryx in a way they were never designed for.

So where does that leave my Occam's razor?  Well Ned has already sent me his solution and I have to say it doesn't involve any spatial tools and if I'd manage to think about the generate rows in the right way it would have been a quicker solution to implement than mine.  My module does run more quickly (0.9 seconds against 2.0 seconds on my machine) but the report only gets run once a month in the middle of the night so speed isn't really a necessity...

You can download Ned's solution here:



I think this one is a simpler solution than mine and for somebody opening the module to make changes in the future somewhat less daunting. So, without the necessity of a fast runtime, by applying Occam's razor I think Ned's is the better solution.

However having said that I hope that my solution has been interesting and might inspire some future spatial solutions to non-spatial problems.