Tableau Cannot use boolean type in IF expression

November 18th, 2016 1 comment

The “Cannot use boolean type in IF expression” error in Tableau calculated fields is quite self-explanatory. You’re not able to use fields that return true or false (i.e. boolean type) with IF statements in Tableau.

However there is a workaround. In many programming languages True or False can be represented as 1 or 0. Tableau recognises 1 and 0 as integers – therefore the way to get around the boolean type error is to wrap the boolean fields in INT().

For example create a simple calculated field with the formula 1=1, which is a boolean type.

Tableau boolean field

Next create a calculated field with an IF statement using the field, deliberately creating the Cannot use boolean type error.

Cannot use boolean type error

Converting the boolean field to an integer will remove this error.

Valid Tableau IF statement

Categories: Tableau Tags:

Using Alteryx for Data Quality checks

November 15th, 2016 No comments

Data Quality is now a rapidly growing area in many Financial Services organisations. There are multiple vendors, such as Informatica and Ab Initio, with software specifically marketed as a data quality tool. Undoubtedly they are both great products, however they are expensive, in all likelihood in the majority organisations would take significant time before they are approved for purchase.

This is where Alteryx can step in, it’s a great tool to very quickly implement a data quality solution. The price point will not deter the majority of FS organisations and the ongoing administration is not an expensive burden.

Most data quality checks are highly specific, hence are bespoke and unable to be standardised. A business rule against a specific data point in a specific data set is a unique check. For example in the financial services world there are a number of rules defining an ISIN. Depending on the country code (first 2 letters of the ISIN) the remainder of the ISIN could have a specific format and a relationship to other data points, such as a CUSIP.

For something as simple as an ISIN there are actually many specific business rules to identify whether it is correct. In the data quality world each business rule is another quality check. These quality checks all require writing to mirror the business rules.

From the technical perspective Data Quality is actually an ETL process.

  • Extraction: the source data needs to be sourced and brought into the quality check
  • Transformation: the business rule check, transforming the source data into a check result
  • Load: the capture of the results

In Alteryx terms a workflow can hold a number of checks against the same data set. A data set is Input to the workflow, the business rules are written using Formula tools and the results are Output.

Significantly accelerate the writing of quality checks by creating an appropriate Data Quality Check template workflow in Alteryx. The inputs and checks (formula tools) are easily modified and the outputs should be standardised for streamlined reporting of the results.

Using Alteryx the technical side and automation of Data Quality checking can be achieved very quickly. Get in touch if you would like to learn more about our tactical Data Quality solution.

Categories: Alteryx Tags: ,

Simple way to add All to a parameter in Tableau

October 3rd, 2016 No comments

Back in 2012, I wrote a post describing an overly complex way to add ‘All’ to a parameter in Tableau. It is surprisingly simple to add All to a parameter if using the parameter to select a value from a dimension.

First create a patameter and add the values from the field and the value All.

Next create a calculated field to use the parameter. The generic formula to use ‘All’ in a Tableau parameter is:

[Parameter] = ‘All’ OR [Parameter] = [DimensionName]

The following is a very simple example based on the Superstore data. In this example the Segment is selected from a parameter, called SegmentParameter. Read more…

Categories: Tableau Tags: ,

Move or Copy files in Alteryx

July 26th, 2016 No comments

In previous posts I’ve written about how to use the Run Command tool in Alteryx to publish a tableau extract to tableau server and how to unzip a file in Alteryx. Another great use for the Alteryx Run Command tool is to move and copy files.

To move files from a directory into another directory the following information is required:

  1. File path of file to move
  2. Destination directory

Set up the workflow in the following way:

1. Enter the above fields in a Text Input tool, creating the fields FullPath and DestinationDirectory

Alteryx Move Copy Text Input

Note: The backslash at the end of the DestinationDirectory is very important. Without that a new file would be created called Engine in D:\Alteryx. Read more…

Categories: Alteryx Tags:

Tableau tabcmd error code 16

July 25th, 2016 No comments

If you come across the tabcmd error code 16, Invalid username or password, it’s likely the error is caused by a special character in the password. For example %1 is interpreted by Tableau as a parameter. In the command line it should be converted to %%1, with the preceding % acting as an escape character.

Another special character Tableau can’t interpret is #. I was unable to find an escape character for that so just changed the password to make tabcmd work for the user with that password.

If anyone knows better ways around this than changing the password please write in the comments.

Categories: Tableau Tags:

Unzip a file in Alteryx

April 21st, 2016 1 comment

I question often seen on the Alteryx forums is how to unzip a file in Alteryx.

In an earlier post I covered how to use the Alteryx Run Command tool to publish a Tableau Data Extract to the Tableau Server in an Alteryx workflow using TabCmd.

This post is similar but is showing how to unzip using the Run Command. The Run Command tool is able to call exe programs, meaning anything possible by exe is possible within Alteryx.

Credit to this solution needs to be given to jdunkerley79 who supplied the solution in the Alteryx forum:

The first thing to do is install software to unzip. Currently I’m using 7-zip ( This can be called via the command prompt.

Next is how to use this in Alteryx: Read more…

Categories: Alteryx Tags:

Publish to Tableau Server from Alteryx using Run Command

March 30th, 2016 No comments

One of the things I often read about on the Alteryx forums is people asking how to publish to Tableau Server from Alteryx. Previously I wrote a post about publishing to Tableau Server from Alteryx using the Events functionality. A downside of this is the timing of the publish to Tableau – it either happens before or after the workflow has run. To publish to Tableau server from within an Alteryx module the Run Command tool can be used, meaning publishing from Alteryx to Tableau Server can happen from anywhere within the worklow. Read more…

Install Alteryx non admin version

February 10th, 2016 No comments

Installing the Alteryx non admin version was a slight challenge as I couldn’t find the right link simply from the Alteryx home page.

Therefore here is a link taking you to the page containing the latest admin and non admin versions of Alteryx:

Categories: Alteryx Tags:

Using Tableau SIZE to display nothing

January 4th, 2016 2 comments

This post is about the Tableau Size function being used to control whether data is displayed based on user filter selections.

This was inspired by a post on the Tableau Forum asking how to display nothing on a dashboard until the lowest level of detail is selected from a number of cascading quick filters.

In this case the questioner wanted a blank dashboard to be shown until a single City was selected, with the user using the filters to navigate from Region > State > City.

This is possible using the SIZE() function. Using ‘Compute Using’ enables the SIZE function returns how many of a given dimension are selected. Read more…

Categories: Tableau Tags:

Publish Tableau Data Extract directly from Alteryx

December 29th, 2015 No comments

For those Alteryx and Tableau Server users the ability to publish Tableau Data Extract (tde) files directly from Alteryx to the Tableau Server is a huge benefit for report automation. There are a number of good posts already published advising how this should be done, such as this excellent guide from Interworks. In this post I’ll replicate some of what is said in the post, should that link break at some point, and also add to it where I ran into difficulties.

To publish to Tableau Server from Alteryx requires using Tableau’s tabcmd. I expect it’s also possible using the REST API from Tableau but I was unable to work it out, so this post will focus on the tabcmd solution, which, in my opinion, is far simpler. If you’re not a Tableau Server administrator in your role you may need to install tabcmd.

Do the following to set up a workflow to publish directly to Tableau Server from Alteryx, using the workflow configuration Events:

Step 1

Open the Alteryx workflow that creates the tde file.


Step 2

In the Events section of the Workflow – Configuration add a Run Command. Also ensure ‘Enable Events’ is checked.


Step 3

Choose “After Run Without Errors”


Step 4

Enter the location of the tabcmd.exe in the Command box


Step 5

Enter the command line to execute in the Command Arguments section. I would recommend entering this into Notepad first and copying into the Command Arguments section.

For some unknown reason when I typed directly into Alteryx or into MS Word, copying to Alteryx, when the command was passed into tabcmd by Alteryx, the quotation marks in the command string weren’t being recognised causing it to fail. Entering the command into Notepad and copying it into Alteryx helped me get around that problem.


Example tabcmd command line:

publish “\\NetworkLocation\TableauDataToPublish.tde” -s TableauServer -u UserName -p Password -t TableauSite -o -r “Data Sources”

Important things to note about the string:

  • publish = the tabcmd being called
  • -s = tells tabcmd which Tableau Server to use. This doesn’t need to be the “https://TableauSite” URL, it is better as the server name as entered to the Tableau Postgres database
  • -u = the username used to login to the Tableau Server (also needs to be set up on the Tableau Server)
  • -p = the password used to login to the Tableau Server
  • -t = the name of the Tableau Site on the Tableau Server to use
  • -r = the project name to publish to. If this is not included the Default project is used.
  • -o = Overwrite the existing tde file with the same name

There are a number of things that can be specified in the tabcmd command string. The Tableau help documentation has a comprehensive list of those items.

Step 6

Ensure the Timeout (in seconds) is set appropriately to give enough time for the tde file to be published to the Tableau Server


Now it’s complete, run the workflow and you should no longer need to manually publish tde files.

Important notes:

  • If using the Alteryx server the Alteryx service account will need setting up on Tableau Server with a Publisher role.
  • If tabcmd fails use the tabcmd.log file to see the error message(s). Alteryx will only tell you it failed, the tabcmd.log will tell you why it has failed. This is copied from the tabcmd overview on the Tableau website advising where to find the tabcmd.log:Status messages and logsWhen a command is successful, tabcmd returns a status code of zero. A full error message for non-zero status codes is printed to stderr. In addition, informative or progress messages may be printed to stdout.A full log named tabcmd.log that includes debugging, progress, and error messages is written to C:\Users\<username>\AppData\Local\Tableau.